diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-04-02 13:06:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-02 20:06:45 +0000 |
| commit | b4a1d618b8d850a579af2840db2df6bee312172c (patch) | |
| tree | 572a5a46eea1956e9e2ccc54c9117ccd78287a54 /tests/cooperative-vector/variadic-init-bad-length.slang | |
| parent | c1f69ca1e29811919dbd2f08a6e2dd498b80aab2 (diff) | |
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.
Diffstat (limited to 'tests/cooperative-vector/variadic-init-bad-length.slang')
| -rw-r--r-- | tests/cooperative-vector/variadic-init-bad-length.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/cooperative-vector/variadic-init-bad-length.slang b/tests/cooperative-vector/variadic-init-bad-length.slang new file mode 100644 index 000000000..1f4c92d29 --- /dev/null +++ b/tests/cooperative-vector/variadic-init-bad-length.slang @@ -0,0 +1,14 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<int32_t> outputBuffer; + +[numthreads(1, 1, 1)] +void computeMain() +{ + let result = CoopVec<int32_t, 4>(1,2,3,4,5); + // CHECK: error 41400: static assertion failed, number of arguments to CoopVec constructor must match number of elements + + for(int i = 0; i < result.getCount(); ++i) + outputBuffer[i] = result[i];; +} |
