diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-01-30 00:59:49 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 00:59:49 -0800 |
| commit | ba9b2785c69c1b8c6d2b4103267b5281815f9f23 (patch) | |
| tree | e4ba4ca76c6592b90764a0a7ac32502639dc93aa /tests/cooperative-vector/CoopVec/array.slang | |
| parent | 2ae194d51e15c064c3d905e628f7335de7504e32 (diff) | |
Support cooperative vector (#6223)
* Support cooperative vector without Vulkan-header update
Adding a Slang support for cooperative vector.
But this commit doesn't have Vulkan-header update.
Diffstat (limited to 'tests/cooperative-vector/CoopVec/array.slang')
| -rw-r--r-- | tests/cooperative-vector/CoopVec/array.slang | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/cooperative-vector/CoopVec/array.slang b/tests/cooperative-vector/CoopVec/array.slang new file mode 100644 index 000000000..b63ff2f91 --- /dev/null +++ b/tests/cooperative-vector/CoopVec/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<float> outputBuffer; + +[numthreads(1, 1, 1)] +void computeMain() +{ + CoopVec<float, 4> vecArray[2]; + vecArray[0] = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); + vecArray[1] = CoopVec<float, 4>(5.0, 6.0, 7.0, 8.0); + + vecArray[0].store(outputBuffer, 0); + vecArray[1].store(outputBuffer, 16); +} |
