diff options
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/gh-775.slang | 32 | ||||
| -rw-r--r-- | tests/bugs/gh-775.slang.expected.txt | 4 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs/gh-775.slang b/tests/bugs/gh-775.slang new file mode 100644 index 000000000..f8125d7d4 --- /dev/null +++ b/tests/bugs/gh-775.slang @@ -0,0 +1,32 @@ +// gh-775.slang +//TEST(compute):COMPARE_COMPUTE: + +int test(int inVal) +{ + float4x4 identity = { + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + }; + + float4 v = float4(inVal, inVal+1, inVal+2, inVal+3); + + v = mul(identity, v); + + return int(dot(v, float4(1, 16, 256, 4096))); +} + +//TEST_INPUT:ubuffer(data=[9 9 9 9], stride=4):dxbinding(0),glbinding(0),out +RWStructuredBuffer<int> outputBuffer : register(u0); + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + uint tid = dispatchThreadID.x; + + int inVal = int(tid); + int outVal = test(inVal); + + outputBuffer[tid] = outVal; +}
\ No newline at end of file diff --git a/tests/bugs/gh-775.slang.expected.txt b/tests/bugs/gh-775.slang.expected.txt new file mode 100644 index 000000000..611a87ad6 --- /dev/null +++ b/tests/bugs/gh-775.slang.expected.txt @@ -0,0 +1,4 @@ +3210 +4321 +5432 +6543 |
