diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-11 21:05:20 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-11 21:05:20 +0100 |
commit | 014fac8f280ed4f16109cf8dfa7d09a003ec3ca6 (patch) | |
tree | ee477d97b1531992b3858fcc490b8994c4e3b319 /servers/rendering/renderer_rd/shaders | |
parent | c41b9c5f5b80e9e1ced37e6c8d12c147601ab9f6 (diff) | |
parent | bbb1f900dde8f2a89bffcaa709cb53b35f05f92c (diff) |
Merge pull request #67746 from SonnyBonds/fix_cluster_shader_mvk
Fix cluster_render.glsl failing on some Macs
Diffstat (limited to 'servers/rendering/renderer_rd/shaders')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/cluster_render.glsl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/shaders/cluster_render.glsl b/servers/rendering/renderer_rd/shaders/cluster_render.glsl index 932312de82..8c26a67926 100644 --- a/servers/rendering/renderer_rd/shaders/cluster_render.glsl +++ b/servers/rendering/renderer_rd/shaders/cluster_render.glsl @@ -142,7 +142,11 @@ void main() { } } #else - if (!gl_HelperInvocation) { +// MoltenVK/Metal fails to compile shaders using gl_HelperInvocation for some GPUs +#ifndef MOLTENVK_USED + if (!gl_HelperInvocation) +#endif + { atomicOr(cluster_render.data[usage_write_offset], usage_write_bit); } #endif @@ -162,7 +166,11 @@ void main() { } } #else - if (!gl_HelperInvocation) { +// MoltenVK/Metal fails to compile shaders using gl_HelperInvocation for some GPUs +#ifndef MOLTENVK_USED + if (!gl_HelperInvocation) +#endif + { atomicOr(cluster_render.data[z_write_offset], z_write_bit); } #endif |