SPIRV-Cross/reference/opt/shaders-msl/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-private-workgroup-in-function.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
atomic.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
barriers.comp Update glslang/SPIRV-Tools on Travis. 2018-03-24 04:16:18 +01:00
basic.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
bitcast-16bit-1.invalid.comp Support bitcasts of 16-bit types. 2018-11-05 14:56:36 -06:00
bitcast-16bit-2.invalid.comp Support bitcasts of 16-bit types. 2018-11-05 14:56:36 -06:00
builtins.comp Update glslang/SPIRV-Tools on Travis. 2018-03-24 04:16:18 +01:00
cfg-preserve-parameter.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
coherent-block.comp Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
coherent-image.comp Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
composite-array-initialization.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
composite-construct.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
copy-array-of-arrays.comp MSL: Support array-of-arrays composite construction. 2018-09-12 10:25:51 +02:00
culling.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
defer-parens.comp Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
dowhile.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
functions.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
global-invocation-id-writable-ssbo-in-function.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
global-invocation-id.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
image-cube-array-load-store.comp Fix image load/store on cube arrays in MSL. 2018-05-25 12:43:25 +02:00
image.comp Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
insert.comp Update reference shaders in reference/opt/shaders-msl. 2017-12-04 18:17:06 -05:00
inverse.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
local-invocation-id.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
local-invocation-index.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
mat3.comp Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
mod.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
modf.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
packing-test-1.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
packing-test-2.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
read-write-only.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
rmw-matrix.comp Do not use RMW rewrite for matrices. 2018-05-04 10:35:56 +02:00
rmw-opt.comp Update tests for latest SPIRV-Tools and glslang. 2018-03-12 15:11:55 +01:00
shared-array-of-arrays.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
shared.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +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 Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
struct-layout.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
struct-nested.comp Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
struct-packing.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
torture-loop.comp Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
type-alias.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
udiv.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
writable-ssbo.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00