diff options
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/division-by-matrix.slang | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/diagnostics/division-by-matrix.slang b/tests/diagnostics/division-by-matrix.slang new file mode 100644 index 000000000..6ed78d353 --- /dev/null +++ b/tests/diagnostics/division-by-matrix.slang @@ -0,0 +1,15 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target metal +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target wgsl + +RWStructuredBuffer<float> outputBuffer; + +[shader("compute")] +[numthreads(1, 1, 1)] +void computeMain() +{ + // CHECK: error 56102: division by matrix is not supported + float3x3 divisor = float3x3(2.5); + divisor[1][1] = 1.5; + outputBuffer[0] = (float3x3(15) / divisor)[0][0]; +} + |
