Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Davis <cdavis@codeweavers.com>2020-10-13 19:41:29 +0300
committerChip Davis <cdavis@codeweavers.com>2020-10-13 19:44:17 +0300
commit7a5d0d6b29a6f4d527f68af67918d46c5e114585 (patch)
tree900d6288ba60a135d30427689e6b5f9207aaa28f /shaders-msl
parentfab6ad234eb9d9308c06ca80908197dc1df562c1 (diff)
MSL: Add missing interlock handling to atomic image buffers.
Diffstat (limited to 'shaders-msl')
-rw-r--r--shaders-msl/frag/pixel-interlock-ordered.msl2.argument.frag4
-rw-r--r--shaders-msl/frag/pixel-interlock-ordered.msl2.frag4
2 files changed, 4 insertions, 4 deletions
diff --git a/shaders-msl/frag/pixel-interlock-ordered.msl2.argument.frag b/shaders-msl/frag/pixel-interlock-ordered.msl2.argument.frag
index 04886a67..ceac8cc5 100644
--- a/shaders-msl/frag/pixel-interlock-ordered.msl2.argument.frag
+++ b/shaders-msl/frag/pixel-interlock-ordered.msl2.argument.frag
@@ -4,7 +4,7 @@
layout(pixel_interlock_ordered) in;
layout(binding = 0, rgba8) uniform writeonly image2D img;
-//layout(binding = 1, r32ui) uniform uimage2D img2;
+layout(binding = 1, r32ui) uniform uimage2D img2;
layout(binding = 2, rgba8) uniform readonly image2D img3;
layout(binding = 3) coherent buffer Buffer
{
@@ -29,7 +29,7 @@ void main()
imageStore(img4, ivec2(1, 1), vec4(1.0, 0.0, 0.0, 1.0));
beginInvocationInterlockARB();
imageStore(img, ivec2(0, 0), imageLoad(img3, ivec2(0, 0)));
- //imageAtomicAdd(img2, ivec2(0, 0), 1u);
+ imageAtomicAdd(img2, ivec2(0, 0), 1u);
foo += 42;
atomicAnd(bar, quux);
endInvocationInterlockARB();
diff --git a/shaders-msl/frag/pixel-interlock-ordered.msl2.frag b/shaders-msl/frag/pixel-interlock-ordered.msl2.frag
index 04886a67..ceac8cc5 100644
--- a/shaders-msl/frag/pixel-interlock-ordered.msl2.frag
+++ b/shaders-msl/frag/pixel-interlock-ordered.msl2.frag
@@ -4,7 +4,7 @@
layout(pixel_interlock_ordered) in;
layout(binding = 0, rgba8) uniform writeonly image2D img;
-//layout(binding = 1, r32ui) uniform uimage2D img2;
+layout(binding = 1, r32ui) uniform uimage2D img2;
layout(binding = 2, rgba8) uniform readonly image2D img3;
layout(binding = 3) coherent buffer Buffer
{
@@ -29,7 +29,7 @@ void main()
imageStore(img4, ivec2(1, 1), vec4(1.0, 0.0, 0.0, 1.0));
beginInvocationInterlockARB();
imageStore(img, ivec2(0, 0), imageLoad(img3, ivec2(0, 0)));
- //imageAtomicAdd(img2, ivec2(0, 0), 1u);
+ imageAtomicAdd(img2, ivec2(0, 0), 1u);
foo += 42;
atomicAnd(bar, quux);
endInvocationInterlockARB();