-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 UI corruption for AMD gpus with Vulkan #9169
Conversation
…. I know very little about Bevy's rendering internals but this seems to be caused by MSAA. Multisampling is disabled for the UI pipeline but is enabled for the camera's ViewTarget, and this seems to cause some conflict. This commit fixes the corruption issues by enabling MSAA for the UiPipeline.
Feels like an issue with either wgpu or drivers... |
Is this related: |
Seems like it. The corruption has only been observed on a subset of AMD cards using the Vulkan backend and official AMD drivers (on both Windows and Linux, OS doesn't seem to make a difference):
Didn't reproduce on:
|
#5721 doesn't look like it's directly related to the corruption bugs, but this PR should fix that issue too. |
#5752 is already fixed. IIRC, it was fixed by disabling MSAA on UI. Let me check this PR doesn't introduce a regression. |
Tested with the Minimal reproducible example from #7012 and I don't see a regression, nice! |
This seems to have broken bloom. edit: It also broke tonemapping. |
Objective
Fixes #8894
Fixes #7944
Solution
The UI pipeline's
MultisampleState::count
is set to 1 whereas theMultisampleState::count
for the camera's ViewTarget is taken from theMsaa
resource, and corruption occurs when these two values are different.This PR solves the problem by setting
MultisampleState::count
for the UI pipeline to the value from the Msaa resource too.I don't know much about Bevy's rendering internals or graphics hardware, so maybe there is a better solution than this. UI MSAA was probably disabled for a good reason (performance?).
Changelog