diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/compute/empty-struct.slang | 19 | ||||
| -rw-r--r-- | tests/compute/empty-struct.slang.expected.txt | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/compute/empty-struct.slang b/tests/compute/empty-struct.slang new file mode 100644 index 000000000..51094fad5 --- /dev/null +++ b/tests/compute/empty-struct.slang @@ -0,0 +1,19 @@ +//TEST(smoke,compute):COMPARE_COMPUTE: +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(0),out +// Confirm that generics syntax can be used in user +// code and generates valid output. + +RWStructuredBuffer<float> outputBuffer; + +struct Simple +{ + float getVal() {return 1.0;} +}; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + Simple s; + float outVal = s.getVal(); + outputBuffer[dispatchThreadID.x] = outVal; +}
\ No newline at end of file diff --git a/tests/compute/empty-struct.slang.expected.txt b/tests/compute/empty-struct.slang.expected.txt new file mode 100644 index 000000000..e143b7f20 --- /dev/null +++ b/tests/compute/empty-struct.slang.expected.txt @@ -0,0 +1,4 @@ +3F800000 +3F800000 +3F800000 +3F800000
\ No newline at end of file |
