diff options
author | Anders Stenberg <495668+SonnyBonds@users.noreply.github.com> | 2022-10-22 12:27:13 +0200 |
---|---|---|
committer | Anders Stenberg <495668+SonnyBonds@users.noreply.github.com> | 2022-10-22 12:27:13 +0200 |
commit | bbb1f900dde8f2a89bffcaa709cb53b35f05f92c (patch) | |
tree | 815112db65d39212b557d6a4b224e203fdefd733 /servers | |
parent | a8c805be2947b211ee8b881d7a8bab7cdc86e170 (diff) |
Fix cluster_render.glsl failing on some Macs
Some Macs encounter an internal error when compiling cluster_render.glsl
caused by a likely bug in the MVK/Metal
compiler when using gl_HelperInvocation.
Diffstat (limited to 'servers')
-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 2fe230f0bf..8e1888d314 100644 --- a/servers/rendering/renderer_rd/shaders/cluster_render.glsl +++ b/servers/rendering/renderer_rd/shaders/cluster_render.glsl @@ -141,7 +141,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 @@ -161,7 +165,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 |