Zebediah Figura (@zfigura) commented about tests/hlsl/duplicate-modifiers.shader_test:
+% Returns (0.1, 0.3, 0.2, 0.4) with dxcompiler +[require] +shader model < 6.0
Wow, I guess this is a dxcompiler bug.
I managed reduce it down to this minimal case:
float4 main() : sv_target { const row_major float2x2 mat = float2x2(1.0, 2.0, 3.0, 4.0); return mat; }
The bug really needs "const" or it doesn't manifest. It also doesn't manifest if you use a braced initializer instead of a constructor.
Also, even better, if you change "float2x2" to "float4" you get an ICE :D