From 2d3422604324f0ba5d6d9298f95d6aa1a897d296 Mon Sep 17 00:00:00 2001 From: Litttle_fish <38809254+Litttlefish@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:07:03 +0800 Subject: [PATCH] disable gpu preprocessing on android with Adreno 730 GPU and earilier (#14176) # Objective Fix #14146 ## Solution Expansion of #13323 , excluded Adreno 730 and earlier. ## Testing Tested on android device(Adreno 730) that used to crash --- crates/bevy_render/src/batching/gpu_preprocessing.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/bevy_render/src/batching/gpu_preprocessing.rs b/crates/bevy_render/src/batching/gpu_preprocessing.rs index 8551aa016e..60794636b4 100644 --- a/crates/bevy_render/src/batching/gpu_preprocessing.rs +++ b/crates/bevy_render/src/batching/gpu_preprocessing.rs @@ -226,8 +226,14 @@ impl FromWorld for GpuPreprocessingSupport { let device = world.resource::(); 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::().is_ok_and(|version| version <= 730) + ) + }) { GpuPreprocessingSupport::None } else if !device