Fix errors when disabling gpu clustering#23547
Conversation
crates/bevy_pbr/src/cluster/mod.rs
Outdated
| // | ||
| // Some android devices report the capabilities and limits wrong, so we can't rely on them. | ||
| // See <https://github.com/bevyengine/bevy/issues/23208> for Android issues | ||
| !cfg!(target_os = "android") |
There was a problem hiding this comment.
| !cfg!(target_os = "android") | |
| !(cfg!(target_os = "android") || cfg!(target_os = "ios")) |
If this gets a target_os for ios as well, it fixes #23428 for the ios simulator as well
There was a problem hiding this comment.
I'm unable to test if #23428 is fixed. It may work without gating ios or ios simulator.
There was a problem hiding this comment.
sorry, I could've been more clear.
What I mean is that I tested this PR by running make in the examples/mobile directory, and observed the problem from #23428 in the simulator. Then I applied the fix suggested here, which removed the issue.
@mockersf might be able to confirm on an actual device, although I don't think the issue appears on their actual ios device.
There was a problem hiding this comment.
Does it only apply to ios simulator? If so we can use target_abi = "sim". But I'm not sure why it can't work.
There was a problem hiding this comment.
gfx-rs/wgpu#7057
the iOS simulator has some weird behaviour about GPU validation, something like it's reporting limits available by the host machine by using validation from an actual devices, which are not the same, and this causes a few features to break. so yes for limiting by the target_abi, we already do in a few places
|
I realized this is may not be the correct approach. This PR forcing non-GPU clustering to use UBO, but before GPU clustering #23036 we can use SSBO. Edit: Resolved |
|
Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke! If it's expected, please add the M-Deliberate-Rendering-Change label. If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it. |
Objective
Fix errors when disabling gpu clustering. Fixes #23208.
Solution
Set cluster buffer bindings correctly.Allow writing cluster on cpu buffer if gpu clustering is disabled.Testing
Tested mobile example on android.