diff options
Diffstat (limited to 'tests/compute')
| -rw-r--r-- | tests/compute/write-structured-buffer-field.slang | 19 | ||||
| -rw-r--r-- | tests/compute/write-structured-buffer-field.slang.expected.txt | 32 |
2 files changed, 51 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 diff --git a/tests/compute/write-structured-buffer-field.slang.expected.txt b/tests/compute/write-structured-buffer-field.slang.expected.txt new file mode 100644 index 000000000..475b4f578 --- /dev/null +++ b/tests/compute/write-structured-buffer-field.slang.expected.txt @@ -0,0 +1,32 @@ +1 +2 +3 +4 +5 +1 +7 +8 +9 +A +B +C +D +1 +F +10 +11 +12 +13 +14 +15 +1 +17 +18 +19 +1A +1B +1C +1D +1 +1F +20 |
