From 127f0c5848f405f9d4f4b1f7f27006c26db748ed Mon Sep 17 00:00:00 2001 From: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Date: Tue, 13 Aug 2024 00:04:15 -0400 Subject: Emit memory qualifier once for GLSL targets (#4819) Fixes #4818 Emit memory qualifier once for GLSL targets. Co-authored-by: Yong He --- tests/bugs/gh-4818-1.slang | 11 +++++++++++ tests/bugs/gh-4818-2.slang | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/bugs/gh-4818-1.slang create mode 100644 tests/bugs/gh-4818-2.slang (limited to 'tests') diff --git a/tests/bugs/gh-4818-1.slang b/tests/bugs/gh-4818-1.slang new file mode 100644 index 000000000..4832bb5fd --- /dev/null +++ b/tests/bugs/gh-4818-1.slang @@ -0,0 +1,11 @@ +//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute + +// CHECK: coherent +// CHECK-NOT: coherent + +globallycoherent RWByteAddressBuffer bab; +RWStructuredBuffer output; +void computeMain() +{ + output[0] = bab.Load(0); +} \ No newline at end of file diff --git a/tests/bugs/gh-4818-2.slang b/tests/bugs/gh-4818-2.slang new file mode 100644 index 000000000..e2a582434 --- /dev/null +++ b/tests/bugs/gh-4818-2.slang @@ -0,0 +1,11 @@ +//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute + +// CHECK: coherent +// CHECK-NOT: coherent + +globallycoherent StructuredBuffer sb; +RWStructuredBuffer output; +void computeMain() +{ + output[0] = sb.Load(0); +} \ No newline at end of file -- cgit v1.2.3