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.
This commit is contained in:
Anders Stenberg 2022-10-22 12:27:13 +02:00
parent a8c805be29
commit bbb1f900dd
1 changed files with 10 additions and 2 deletions

View File

@ -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