From 60c5db5caba089bf879fc958f373137b3e12a2d8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 26 Feb 2025 22:38:23 -0800 Subject: Fix regression when using Atomic in struct. (#6472) --- tests/bugs/gh-6380-atomic-in-struct.slang | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/bugs/gh-6380-atomic-in-struct.slang (limited to 'tests') diff --git a/tests/bugs/gh-6380-atomic-in-struct.slang b/tests/bugs/gh-6380-atomic-in-struct.slang new file mode 100644 index 000000000..7eda02418 --- /dev/null +++ b/tests/bugs/gh-6380-atomic-in-struct.slang @@ -0,0 +1,15 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv +//CHECK: OpEntryPoint + +struct Test { + Atomic test; +} + +RWStructuredBuffer data; + +[shader("compute")] +[numthreads(1,1,1)] +public void main() { + Test t = Test(1); + data[0].test.increment(); +} \ No newline at end of file -- cgit v1.2.3