SPIRV-Cross/reference/shaders-msl/frag
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
..
16bit-constants.frag Support constants of 16-bit integral type in GLSL and MSL. 2018-11-02 14:39:55 -05:00
array-lut-no-loop-variable.frag Only declare typed initializer list for non-array types. 2018-09-10 10:04:17 +02:00
basic.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
binary-func-unpack-pack-arguments.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
binary-unpack-pack-arguments.frag Regenerate MSL shaders to fix conflicts from merge. 2018-06-12 11:51:56 -04:00
bitcasting.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
buffer-read.frag Add spvTexelBufferCoord for buffer image reads, too. 2018-09-23 14:37:03 -05:00
builtins.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
complex-expression-in-access-chain.frag Register implied expression reads in OpLoad/OpAccessChain. 2019-01-04 14:56:12 +01:00
composite-extract-forced-temporary.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
constant-array.frag Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
constant-composites.frag MSL: Support copying array of arrays. 2018-09-12 09:54:55 +02:00
control-dependent-in-branch.desktop.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
depth-greater-than.frag MSL: Split out early_fragment_tests. 2018-11-12 16:20:49 +01:00
depth-less-than.frag MSL: Split out early_fragment_tests. 2018-11-12 16:20:49 +01:00
dual-source-blending.frag Support dual-source blending on GLSL and MSL. 2018-04-03 16:04:49 +02:00
early-fragment-tests.frag MSL: Split out early_fragment_tests. 2018-11-12 16:20:49 +01:00
false-loop-init.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
flush_params.frag Enhance MSL testing and add numerous MSL test cases. 2017-01-30 22:55:21 -05:00
for-loop-init.frag Fix execution order for for-loop emission. 2017-02-04 10:07:20 +01:00
fp16-packing.frag MSL: Handle interpolation qualifiers. 2018-09-05 12:02:07 -05:00
fp16.desktop.invalid.frag Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
front-facing.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
gather-dref.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
gather-offset.frag Compiler MSL default gather offset when component specified. 2018-04-30 16:30:29 -04:00
helper-invocation.msl21.frag Support gl_HelperInvocation on GLSL and MSL. 2018-11-28 15:18:43 +01:00
illegal-name-test-0.frag Add more illegal name replacement in MSL. 2018-04-03 15:36:35 +02:00
in_block.frag MSL: Support global I/O block and struct Input/Output usage. 2018-09-13 16:04:24 +02:00
in_mat.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
input-attachment-ms.frag Support passing implicit frag_coord arguments down to functions. 2018-02-10 10:55:09 +01:00
input-attachment.frag Support passing implicit frag_coord arguments down to functions. 2018-02-10 10:55:09 +01:00
interpolation-qualifiers-block.frag MSL: Support global I/O block and struct Input/Output usage. 2018-09-13 16:04:24 +02:00
interpolation-qualifiers.frag MSL: Handle interpolation qualifiers. 2018-09-05 12:02:07 -05:00
lut-promotion.frag MSL: Support copying array of arrays. 2018-09-12 09:54:55 +02:00
mix.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
mrt-array.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
packed-expression-vector-shuffle.frag Deal with packed expressions in more scenarios. 2018-05-25 10:57:02 +02:00
packing-test-3.frag Rewrite how IDs are iterated over. 2019-01-10 12:52:56 +01:00
pls.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
readonly-ssbo.frag Add test for reading SSBO from fragment shader on MSL. 2018-05-25 10:20:17 +02:00
sample-depth-separate-image-sampler.frag Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
sample-mask.frag CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 2018-02-13 14:44:40 -05:00
sample-position-func.frag Use a hook to emit a local for the sample position. 2018-09-17 11:51:09 -05:00
sample-position.frag Use a hook to emit a local for the sample position. 2018-09-17 11:51:09 -05:00
sampler-1d-lod.frag MSL: Handle interpolation qualifiers. 2018-09-05 12:02:07 -05:00
sampler-compare-cascade-gradient.frag MSL: Workaround missing gradient2d() for sampler_compare. 2019-01-07 10:01:00 +01:00
sampler-compare-cascade-gradient.ios.frag MSL: Workaround missing gradient2d() for sampler_compare. 2019-01-07 10:01:00 +01:00
sampler-image-arrays.msl2.frag MSL: Handle interpolation qualifiers. 2018-09-05 12:02:07 -05:00
sampler-ms.frag Update test files 2018-01-29 06:40:45 -08:00
sampler.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
separate-image-sampler-argument.frag Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
shadow-compare-global-alias.invalid.frag Update glslang and SPIRV-Tools. 2018-09-27 11:10:22 +02:00
spec-constant-block-size.frag Update tests. 2018-11-01 11:23:48 +01:00
spec-constant-ternary.frag Support ternary expressions in OpSpecConstantOp. 2018-06-25 09:49:13 +02:00
switch-unsigned-case.frag Fix unsigned switch case selectors. 2018-11-26 10:36:50 +01:00
swizzle.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
texel-fetch-offset.frag Need to make sure the fetch expression is uint. 2018-08-07 16:02:17 +02:00
texture-multisample-array.msl21.frag MSL: Support texture2d_ms_array. 2018-09-03 11:02:31 +02:00
texture-proj-shadow.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
ubo_layout.frag Update tests. 2018-03-05 16:34:42 +01:00
unary-enclose.frag CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
write-depth-in-function.frag MSL: Add test case for gl_FragDepth when used in function. 2018-08-29 09:21:48 +02:00