From 913f4d09b91e3fd7449468b135881c940cacb3c0 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 20 Jan 2018 02:48:12 -0500 Subject: bug fixes fixes #373 fixes bug that misses current translation unit's scope when resolving entry-point global type argument expression. --- tests/compute/array-param.slang | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/compute/array-param.slang (limited to 'tests/compute/array-param.slang') diff --git a/tests/compute/array-param.slang b/tests/compute/array-param.slang new file mode 100644 index 000000000..78ca52518 --- /dev/null +++ b/tests/compute/array-param.slang @@ -0,0 +1,19 @@ +//TEST(compute):COMPARE_COMPUTE:-xslang -use-ir +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(0),out + +RWStructuredBuffer outputBuffer; +void writeArray(inout float3 a[4]) +{ + a[0] = float3(1, 1, 1); + a[1] = float3(1, 1, 1); + a[2] = float3(1, 1, 1); + a[3] = float3(1, 1, 1); +} + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + float3 b[4]; + writeArray(b); + outputBuffer[dispatchThreadID.x] = b[0].x; +} \ No newline at end of file -- cgit v1.2.3