-
-
Notifications
You must be signed in to change notification settings - Fork 22.7k
[macOS] Restore gl_HelperInvocation
workaround for Intel macs.
#107769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Should be fine for runtime shader generation on Intel Macs, but should be noted that when baking on Linux or Windows, Is it specific GPUs on Intel Macs that don't work? |
Same with
No idea, but the issue was recently encountered on AMD GPU and previously on Intel GPUs, so I assume it's a generic issue with all Intel macs. |
Good point – I need to test I noticed @akien-mga is upgrading Vulkan SDKs in #107773. |
In order to address that, additional context needs to be passed through the renderer, so that it can bake for different targets / platforms with different feature sets. I already started that in the Metal shader baker code, where I can pass OS + GPU to govern how the shaders are generated and compiled. |
@@ -234,9 +234,11 @@ void ShaderRD::_build_variant_code(StringBuilder &builder, uint32_t p_variant, c | |||
builder.append(String("#define ") + String(E.key) + "_CODE_USED\n"); | |||
} | |||
#if (defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)) | |||
#if defined(__x86_64) || defined(__x86_64__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe __x86_64__
should always work, no? So __x86_64
is likely redundant and not necessary.
In case on Metal it seems to be doing it on already compiled SPIRV code, this probably won't work with |
Restores workaround removed in #102552
Fixes #107753
If I understand correctly, it's not adding any new defines, so should not create additional shader variants for baker and cause any issues.