From c55805e9c6dc3a44e3983fea4245cb00d4e318d5 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 27 Sep 2024 19:27:20 -0700 Subject: Fix bug in `translateGlslGlobalVar()`. (#5181) --- tests/bugs/gh-5027.slang | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/bugs/gh-5027.slang (limited to 'tests') diff --git a/tests/bugs/gh-5027.slang b/tests/bugs/gh-5027.slang new file mode 100644 index 000000000..ade58564b --- /dev/null +++ b/tests/bugs/gh-5027.slang @@ -0,0 +1,16 @@ +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-d3d11 -output-using-type + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer outputBuffer; + +in uint3 gid : SV_GroupID; + +[numthreads(1,1,1)] +void computeMain() +{ + uint expr = WorkgroupSize().x + gid.x; + // CHECK: type: uint32_t + // CHECK: 2 + outputBuffer[0] = expr + 1; +} \ No newline at end of file -- cgit v1.2.3