diff options
Diffstat (limited to 'tests/compute')
| -rw-r--r-- | tests/compute/semantic.slang | 13 | ||||
| -rw-r--r-- | tests/compute/semantic.slang.expected.txt | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/compute/semantic.slang b/tests/compute/semantic.slang new file mode 100644 index 000000000..12b0ca853 --- /dev/null +++ b/tests/compute/semantic.slang @@ -0,0 +1,13 @@ +//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -compile-arg -O3 -compute-dispatch 3,1,1 +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -compute-dispatch 3,1,1 +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -compute-dispatch 3,1,1 +//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -compute-dispatch 3,1,1 + +//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):dxbinding(0),glbinding(0),out,name outputBuffer +RWStructuredBuffer<int> outputBuffer; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID, uint3 groupID : SV_GroupID, uint3 groupThreadID : SV_GroupThreadId) +{ + outputBuffer[dispatchThreadID.x] = (dispatchThreadID.x << 8) | (groupID.x << 4) | (groupThreadID.x); +}
\ No newline at end of file diff --git a/tests/compute/semantic.slang.expected.txt b/tests/compute/semantic.slang.expected.txt new file mode 100644 index 000000000..4c57d34ed --- /dev/null +++ b/tests/compute/semantic.slang.expected.txt @@ -0,0 +1,12 @@ +0 +101 +202 +303 +410 +511 +612 +713 +820 +921 +A22 +B23 |
