Fix stale occlusion culling components#23555
Conversation
When occlusion culling gets disabled for a view we didn't clean up the generated components, which caused some later occlusion culling systems to run in an invalid state.
ChristopherBiscardi
left a comment
There was a problem hiding this comment.
nice. I have confirmed that the previous validation warning (for downsample multisample depth bind group) no longer shows when switching between on/off in the occlusion culling example on macos.
|
How about using |
I gave it a shot, but it's not trivial. The |
# Objective Fixes bevyengine#23108 When occlusion culling gets disabled for a view we didn't clean up the generated components, which caused some later occlusion culling systems to run in an invalid state. This problem was discovered recently, and while I haven't bisected it my guess is that it's been present since the retained render world. We could really use a more general approach to catching and/or preventing these issues with stale resources. ## Solution Remove stale resources in the prepare system before we make new ones. ## Testing `cargo run --example occlusion_culling` and press space a couple of times.
Objective
Fixes #23108
When occlusion culling gets disabled for a view we didn't clean up the generated components, which caused some later occlusion culling systems to run in an invalid state.
This problem was discovered recently, and while I haven't bisected it my guess is that it's been present since the retained render world. We could really use a more general approach to catching and/or preventing these issues with stale resources.
Solution
Remove stale resources in the prepare system before we make new ones.
Testing
cargo run --example occlusion_cullingand press space a couple of times.