From b4a1d618b8d850a579af2840db2df6bee312172c Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 2 Apr 2025 13:06:45 -0700 Subject: Enable coopvec tests with dxc backend (#6726) This PR enables existing CoopVec tests with DX12 backend. In order to use the CoopVec feature with DX12 backend, we have to use an option, "-dx12-experimental", because the current implementation of CoopVec feature in dxcompiler.dll requires "experimental feature". Note that when the "experimental feature" is enabled, slang-test becomes less stable. For that reason, we should use the option "-dx12-experimental" only when it is needed. All tests for GLSL are deleted because CoopVec support for GLSL in Slang is deprecated and no longer supported. Some of CoopVec tests are still disabled for DX12 backend because: DXC doesn't support 8bit integer types and Some of CoopVec features are not implemented in DXC backend. --- tests/cooperative-vector/array.slang | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/cooperative-vector/array.slang (limited to 'tests/cooperative-vector/array.slang') diff --git a/tests/cooperative-vector/array.slang b/tests/cooperative-vector/array.slang new file mode 100644 index 000000000..b63ff2f91 --- /dev/null +++ b/tests/cooperative-vector/array.slang @@ -0,0 +1,25 @@ +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation + +// CHECK: type: float +// CHECK-NEXT: 1.000000 +// CHECK-NEXT: 2.000000 +// CHECK-NEXT: 3.000000 +// CHECK-NEXT: 4.000000 +// CHECK-NEXT: 5.000000 +// CHECK-NEXT: 6.000000 +// CHECK-NEXT: 7.000000 +// CHECK-NEXT: 8.000000 + +//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer outputBuffer; + +[numthreads(1, 1, 1)] +void computeMain() +{ + CoopVec vecArray[2]; + vecArray[0] = CoopVec(1.0, 2.0, 3.0, 4.0); + vecArray[1] = CoopVec(5.0, 6.0, 7.0, 8.0); + + vecArray[0].store(outputBuffer, 0); + vecArray[1].store(outputBuffer, 16); +} -- cgit v1.2.3