-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Fix MSAA crashing on intel macbooks #67913
base: master
Are you sure you want to change the base?
Fix MSAA crashing on intel macbooks #67913
Conversation
This default previously would send a signal on metal. Changing it fixes the crash.
Out of curiosity, why does the cluster builder always use 4× MSAA regardless of the viewport's MSAA level? |
CC @RandomShaper When Gordon and I were looking into this it looked like allocating the MSAA buffer resulted in some sort of compatibility issue with the swapchain (which is only allocated with 1 sample). Perhaps there is some validation we can do here to only allocated 4 samples when it is supported? I guess at the very least we can check for subgroup support, or just only use this "fix" when using MoltenVK |
So just enabling Enabling |
I think the problem is MSAA in this specific Pipeline, this code does not control MSAA for ordinary rendering (like the MSAA project setting) |
@clayjohn, I agree. Provided the problem is that MSAA is not supported on the target hardware for the specific usage cluster building needs, it'd be indeed a matter of checking and fall back to the non-MSAA version of the pipeline. I'm not in front of my PC at the moment, so I can't easily grep the code to see how that determination is being done. @Calinou, as far as I understood from what @reduz explained to me, this half width, half size, 4x MSAA approach to cluster building is an optimization. You have four times less invocations of the fragment shader, but along the edges you can still collect if a pixel was at least slightly touched, which is all that matters. It's like some sort of manually crafted conservative rasterization. |
Bumping to 4.x. We need to keep tabs on this crash. But the proper solution will be to check if MSAA 4x is supported and use that, falling back to 1x if not supported. |
This default previously would send a signal on metal. Changing it fixes the crash.
We should discuss this setting in more detail before merge, the default may need to be platform specific for macos.