SPIRV-Cross/reference/opt/shaders-hlsl/comp
Hans-Kristian Arntzen d92de00cc1 Rewrite how IDs are iterated over.
This is a fairly fundamental change on how IDs are handled.
It serves many purposes:

- Improve performance. We only need to iterate over IDs which are
  relevant at any one time.
- Makes sure we iterate through IDs in SPIR-V module declaration order
  rather than ID space. IDs don't have to be monotonically increasing,
  which was an assumption SPIRV-Cross used to have. It has apparently
  never been a problem until now.
- Support LUTs of structs. We do this by interleaving declaration of
  constants and struct types in SPIR-V module order.

To support this, the ParsedIR interface needed to change slightly.
Before setting any ID with variant_set<T> we let ParsedIR know
that an ID with a specific type has been added. The surface for change
should be minimal.

ParsedIR will maintain a per-type list of IDs which the cross-compiler
will need to consider for later.

Instead of looping over ir.ids[] (which can be extremely large), we loop
over types now, using:

ir.for_each_typed_id<SPIRVariable>([&](uint32_t id, SPIRVariable &var) {
	handle_variable(var);
});

Now we make sure that we're never looking at irrelevant types.
2019-01-10 12:52:56 +01:00
..
access-chains.comp Use t-namespace for ByteAddressBuffer. 2017-12-11 13:55:26 +01:00
address-buffers.comp Swizzle scalars when splatting in HLSL. 2017-12-12 12:52:45 +01:00
atomic-decrement.asm.comp Implement atomic increment/decrement in GLSL and HLSL. 2018-09-17 15:54:21 +02:00
atomic-increment.asm.comp Implement atomic increment/decrement in GLSL and HLSL. 2018-09-17 15:54:21 +02:00
atomic.comp Remove duplicate swizzles in remap_swizzle. 2017-12-12 13:01:10 +01:00
barriers.comp Update glslang/SPIRV-Tools on Travis. 2018-03-24 04:16:18 +01:00
builtins.comp Update glslang/SPIRV-Tools on Travis. 2018-03-24 04:16:18 +01:00
composite-array-initialization.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
globallycoherent.comp Support globallycoherent in HLSL. 2018-06-25 10:04:25 +02:00
image.comp Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
inverse.comp Implement MatrixInverse on HLSL. 2018-02-23 16:42:40 +01:00
num-workgroups-alone.comp HLSL: Use same logic as GLSL for picking cbuffer block name. 2018-10-22 09:50:04 +02:00
num-workgroups-with-builtins.comp HLSL: Use same logic as GLSL for picking cbuffer block name. 2018-10-22 09:50:04 +02:00
rmw-matrix.comp Do not use RMW rewrite for matrices. 2018-05-04 10:35:56 +02:00
rwbuffer-matrix.comp HLSL: Use same logic as GLSL for picking cbuffer block name. 2018-10-22 09:50:04 +02:00
shared.comp Update glslang/SPIRV-Tools on Travis. 2018-03-24 04:16:18 +01:00
spec-constant-op-member-array.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
spec-constant-work-group-size.comp HLSL: Complete support for combined image samplers in legacy. 2018-11-12 09:59:39 +01:00
ssbo-array.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
subgroups.invalid.nofxc.sm60.comp Partially implement subgroup ops for HLSL SM 6.0. 2018-04-11 15:57:41 +02:00