diff options
Diffstat (limited to 'tests/cooperative-vector/load-store-rwstructuredbuffer.slang')
| -rw-r--r-- | tests/cooperative-vector/load-store-rwstructuredbuffer.slang | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/cooperative-vector/load-store-rwstructuredbuffer.slang b/tests/cooperative-vector/load-store-rwstructuredbuffer.slang new file mode 100644 index 000000000..6a89aa59e --- /dev/null +++ b/tests/cooperative-vector/load-store-rwstructuredbuffer.slang @@ -0,0 +1,30 @@ +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type + +// HLSL doesn't support structured buffers for CoopVec +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. + +// CHECK: type: int32_t +// CHECK-NEXT: 5 +// CHECK-NEXT: 6 +// CHECK-NEXT: 7 +// CHECK-NEXT: 8 +// CHECK-NEXT: 1 +// CHECK-NEXT: 2 +// CHECK-NEXT: 3 +// CHECK-NEXT: 4 + +//TEST_INPUT:ubuffer(data=[1 2 3 4 5 6 7 8], stride=4),name=buf +RWStructuredBuffer<int32_t> inputBuffer; + +//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<int32_t> outputBuffer; + +[numthreads(1, 1, 1)] +void computeMain() +{ + let a = coopVecLoad<4>(inputBuffer, 0); + let b = coopVecLoad<4>(inputBuffer, 4*4); + b.store(outputBuffer, 0); + a.store(outputBuffer, 4*4); +} |
