Fix remap_vector redefinition on macOS (#11271)

This commit is contained in:
nastys 2021-12-21 10:36:09 +01:00 committed by GitHub
parent c0bafbc804
commit 47e4a95d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -764,7 +764,7 @@ namespace glsl
OS <<
#ifdef __APPLE__
"vec4 remap_vector(const in vec4 rgba, const in uint remap_bits)\n"
"vec4 remap_vector_m(const in vec4 rgba, const in uint remap_bits)\n"
"{\n"
" uvec4 selector = (uvec4(remap_bits) >> uvec4(3, 6, 9, 0)) & 0x7;\n"
" bvec4 choice = greaterThan(selector, uvec4(1));\n"
@ -781,7 +781,7 @@ namespace glsl
"{\n"
#ifdef __APPLE__
" uint remap_bits = (control_bits >> 16) & 0xFFFF;\n"
" if (remap_bits != 0x8D5) rgba = remap_vector(rgba, remap_bits);\n\n"
" if (remap_bits != 0x8D5) rgba = remap_vector_m(rgba, remap_bits);\n\n"
#endif
" if (control_bits == 0)\n"
" {\n"