SPIRV-Cross/reference/opt/shaders-msl
Hans-Kristian Arntzen 461f1506e7 Do not eagerly invalidate all active variables on a branch.
This is not necessary, as we must emit an invalidating store before we
potentially consume an invalid expression. In fact, we're a bit
conservative here in this case for example:

int tmp = variable;
if (...)
{
    variable = 10;
}
else
{
    // Consuming tmp here is fine, but it was
    // invalidated while emitting other branch.
    // Technically, we need to study if there is an invalidating store
    // in the CFG between the loading block and this block, and the other
    // branch will not be a part of that analysis.
    int tmp2 = tmp * tmp;
}

Fixing this case means complex CFG traversal *everywhere*, and it feels like overkill.

Fixing this exposed a bug with access chains, so fix a bug where expression dependencies were not
inherited properly in access chains. Access chains are now considered forwarded if there
is at least one dependency which is also forwarded.
2019-07-24 11:17:30 +02:00
..
amd MSL: Support the SPV_AMD_shader_trinary_minmax extension. 2019-07-13 16:43:57 -05:00
asm Do not eagerly invalidate all active variables on a branch. 2019-07-24 11:17:30 +02:00
comp Simplify row-major matrix/vector multiplies. 2019-07-23 10:56:57 +02:00
desktop-only MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
flatten Tests run clean. 2019-07-22 10:23:39 +02:00
frag Do not eagerly invalidate all active variables on a branch. 2019-07-24 11:17:30 +02:00
intel MSL: Support the SPV_INTEL_shader_integer_functions2 extension. 2019-07-15 09:42:36 -05:00
legacy/vert CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
tesc Fix tests for device->constant address space change in MSL tessellation control shader generation. 2019-04-10 18:37:04 +01:00
tese MSL: Rewrite how resource indices are fallback-assigned. 2019-06-21 12:54:08 +02:00
vert Deal correctly with non-forwarded packed loads. 2019-07-23 16:25:19 +02:00
vulkan Deal correctly with complete stores to row_major matrices. 2019-07-22 15:49:17 +02:00