diff options
Diffstat (limited to 'tests/compute/write-structured-buffer-field.slang')
| -rw-r--r-- | tests/compute/write-structured-buffer-field.slang | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/compute/write-structured-buffer-field.slang b/tests/compute/write-structured-buffer-field.slang new file mode 100644 index 000000000..b824644b2 --- /dev/null +++ b/tests/compute/write-structured-buffer-field.slang @@ -0,0 +1,19 @@ +//TEST(compute):COMPARE_COMPUTE:-xslang -use-ir + +//TEST_INPUT:ubuffer(data=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32], stride=32):dxbinding(0),glbinding(0),out + +struct S +{ + int4 a; + int4 b; +}; + +RWStructuredBuffer<S> outputBuffer; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + uint tid = dispatchThreadID.x; + + outputBuffer[tid].b.y = outputBuffer[0].a.x; +}
\ No newline at end of file |
