SPIRV-Cross/reference/opt/shaders-msl/asm/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
..
atomic-decrement.asm.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
atomic-increment.asm.comp Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
bitcast_iadd.asm.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
bitcast_sar.asm.comp Expand the implementation of inherit_expression_dependencies. 2018-03-09 13:21:38 +01:00
bitcast_sdiv.asm.comp Expand the implementation of inherit_expression_dependencies. 2018-03-09 13:21:38 +01:00
bitcast_slr.asm.comp Expand the implementation of inherit_expression_dependencies. 2018-03-09 13:21:38 +01:00
block-name-alias-global.asm.comp Use correct block-name / other-name aliasing rules. 2019-01-04 15:02:54 +01:00
buffer-write-relative-addr.asm.comp Use bitcast_to_builtin_load() instead of hacking to_expression(). 2018-09-11 11:15:17 -05:00
buffer-write.asm.comp MSL: Emit spvTexelBufferCoord() on ImageWrite to a Buffer as well. 2018-09-04 12:14:34 -05:00
global-parameter-name-alias.asm.comp MSL: Fix naming issue of aliased global variables. 2018-08-27 09:59:55 +02:00
multiple-entry.asm.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
quantize.asm.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
relaxed-block-layout.asm.comp Test loading from and storing to packed vectors. 2018-11-14 10:47:20 -06:00
specialization-constant-workgroup.asm.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
storage-buffer-basic.invalid.asm.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
variable-pointers-2.asm.comp MSL: Support SPV_KHR_variable_pointers. 2019-01-07 11:19:10 -06:00
variable-pointers-store-forwarding.asm.comp Flush all variables after storing through a variable pointer. 2019-01-08 15:16:33 -06:00
vector-builtin-type-cast-func.asm.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
vector-builtin-type-cast.asm.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00