Skip to content

Commit

Permalink
disable gpu preprocessing on android with Adreno 730 GPU and earilier (
Browse files Browse the repository at this point in the history
…#14176)

# Objective

Fix #14146 

## Solution

Expansion of #13323 , excluded Adreno 730 and earlier.

## Testing

Tested on android device(Adreno 730) that used to crash
  • Loading branch information
Litttlefish authored and mockersf committed Aug 2, 2024
1 parent e941264 commit 5d9e44b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/bevy_render/src/batching/gpu_preprocessing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,14 @@ impl FromWorld for GpuPreprocessingSupport {
let device = world.resource::<RenderDevice>();

if device.limits().max_compute_workgroup_size_x == 0 ||
// filter lower end / older devices on Android as they crash when using GPU preprocessing
(cfg!(target_os = "android") && adapter.get_info().name.starts_with("Adreno (TM) 6"))
// filter some Qualcomm devices on Android as they crash when using GPU preprocessing
(cfg!(target_os = "android") && {
let name = adapter.get_info().name;
// filter out Adreno 730 and earlier GPUs (except 720, it's newer than 730)
name.strip_prefix("Adreno (TM) ").is_some_and(|version|
version != "720" && version.parse::<u16>().is_ok_and(|version| version <= 730)
)
})
{
GpuPreprocessingSupport::None
} else if !device
Expand Down

0 comments on commit 5d9e44b

Please sign in to comment.