From 48b6e2432ea28c06d04931fccd633e31eed6d995 Mon Sep 17 00:00:00 2001 From: venkataram-nv Date: Fri, 18 Jul 2025 09:38:00 -0700 Subject: Lower int/uint/bool matrices to arrays for SPIRV (#7687) * Add tests for expected behaviour * Allow matrix types in logical or/and * Legalize int/bool matrix types and construction with makeMatrix * Legalize uint matrices and operations * Limit testing to only SPIRV * Better tests for int and bool * Add test for uint * Remove GLSL tests * Remove old test for diagnosing int matrices * Emit SPIRV directly in tests * format code * Address PR comments * Improve testing * Address PR comments * format code * Add tests for matrix intrinsic operations * Move matrix lowering to dedicated legalization pass * Fix compiler warning * Remove signal again * Reorder matrix and vector legalization * Fix formatting * Add shift and comparison tests --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/compute/integer-matrix-diagnostic.slang | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 tests/compute/integer-matrix-diagnostic.slang (limited to 'tests/compute') diff --git a/tests/compute/integer-matrix-diagnostic.slang b/tests/compute/integer-matrix-diagnostic.slang deleted file mode 100644 index bd69c28e4..000000000 --- a/tests/compute/integer-matrix-diagnostic.slang +++ /dev/null @@ -1,22 +0,0 @@ -// Check that using matrices with integer floating point type yields the correct diagnostic - -//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute -//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target metal -entry computeMain -stage compute -//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv -entry computeMain -stage compute -//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target wgsl -entry computeMain -stage compute - -cbuffer MatrixBuffer -{ - // CHECK: error 38202 - int4x4 iMatrix; -} - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out, name=outputBuffer -RWStructuredBuffer outputBuffer; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - uint index = dispatchThreadID.x; - outputBuffer[index] = iMatrix[0][0]; -} \ No newline at end of file -- cgit v1.2.3