-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
MacOS Rendering Corruption starting on 0.19.0 #25595
Copy link
Copy link
Open
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesI-RegressionFunctionality that used to work but no longer does. Add a test for this!Functionality that used to work but no longer does. Add a test for this!O-MacOSSpecific to the MacOS (Apple) desktop operating systemSpecific to the MacOS (Apple) desktop operating systemS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Description
Activity
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesI-RegressionFunctionality that used to work but no longer does. Add a test for this!Functionality that used to work but no longer does. Add a test for this!O-MacOSSpecific to the MacOS (Apple) desktop operating systemSpecific to the MacOS (Apple) desktop operating systemS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Type
Projects
- StatusShow more project fieldsNeeds SME Triage
Bevy version and features
[Optional] Relevant system information
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
What you did
I'm encountering a combination of 2 issues:
It happens under these circumstances, but I haven't been able to narrow it down specifically:
I'm working really hard to get a minimal reproducible build, But I haven't been successful. The problem seems to scale with complexity, so I think you need a complicated rendering setup to get the issue to trigger. I would be willing to share my reproduction with select maintainers if requested.
What went wrong
Here's a video of the corruption:
recordning.mp4
Additional information
Theory About GPU Preprocessing
I'm able to fix the issue by forcing the WGPU to use CPU preprocessing. This changes the log
GPU preprocessing is fully supported on this device.to(GPU preprocessing is not supported on this device. Falling back to CPU preprocessing.),. When I do this, my framerate improves, and the flickering and material swapping goes away entirely.Hunches: I am not super knowledgeable about WGPU internals, but doing some research, here's some thoughts:
WgpuSettings::disabled_features(WgpuFeatures::TEXTURE_BINDING_ARRAY), thinking the issue was related to bindless textures, but this didn't solve itAlphaMode::Blendmeshes to flicker #21739, AlphaMode::Blend meshes flickering with indirect drawingHere's the workaround that fixes the issue even on 0.19.1: