SPIRV-Cross/reference/shaders/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.comp Do not add dependencies for variables loaded from UniformConstant. 2016-04-01 19:58:26 +02:00
bake_gradient.comp Fix declaration of coherent images. 2017-08-29 15:52:59 +02:00
barriers.comp Add more exhaustive test for barrier handling. 2018-01-09 12:26:46 +01:00
basic.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01: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
casts.comp Implement more correct integer op handling. 2016-05-13 15:23:33 +02:00
cfg-preserve-parameter.comp Analyze parameter preservation for functions. 2017-03-25 16:25:30 +01:00
cfg.comp Fix edge-case where do/while body is a dominator. 2017-08-02 11:58:24 +02:00
coherent-block.comp Add test shader for coherent SSBO. 2017-08-28 09:02:08 +02:00
coherent-image.comp Add restrict qualifier for images. 2017-08-29 15:54:22 +02:00
composite-array-initialization.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
composite-construct.comp Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
culling.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
defer-parens.comp Add more dedicated test shader for defer-parens. 2016-12-08 09:05:30 +01:00
dowhile.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
generate_height.comp Rewrite everything to use Bitset rather than uint64_t. 2018-03-12 13:24:14 +01:00
image.comp Fix declaration of coherent images. 2017-08-29 15:52:59 +02:00
inout-struct.invalid.comp Preserve arguments with inout unless complete writes are made. 2017-08-09 17:06:41 +02:00
insert.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
mat3.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
mod.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
modf.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
read-write-only.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
rmw-matrix.comp Do not use RMW rewrite for matrices. 2018-05-04 10:35:56 +02:00
rmw-opt.comp Add regression test for RMW optimizations. 2017-09-06 09:20:55 +02:00
shared.comp Optimize away redundant barriers. 2018-01-09 12:17:38 +01:00
ssbo-array.comp Add array-of-SSBO test. 2016-03-22 14:49:43 +01:00
struct-layout.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
struct-packing.comp Handle inout properly with split access chains. 2018-05-11 10:15:42 +02:00
torture-loop.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
type-alias.comp Defer parenthesis generation until needed. 2016-12-05 10:56:54 +01:00
udiv.comp Defer parenthesis generation until needed. 2016-12-05 10:56:54 +01:00