https://godbolt.org/z/a9KK44hn9
This constant folding test:
// RUN: %dxc -HV 202x -T cs_6_0 %s
RWStructuredBuffer<float4> Out : register(u1);
[numthreads(1,1,1)]
void main() {
float2x2 R22Const = frac(float2x2(-1.75, -0.25, 0.75, 1.25));
Out[0] = float4(R22Const[0], R22Const[1]);
}
produces 0.75, 0.25, 0.75, 0.25 as output when the expected result is 0.25, 0.75, 0.75, 0.25.
This error only happens on DirectX with negative matrix arguments. The same operation performed using buffer values gives the correct output.
https://godbolt.org/z/a9KK44hn9
This constant folding test:
produces
0.75, 0.25, 0.75, 0.25as output when the expected result is0.25, 0.75, 0.75, 0.25.This error only happens on DirectX with negative matrix arguments. The same operation performed using buffer values gives the correct output.