From a9dcf482c69726f79fc3d33e25192f006df691f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 18 Dec 2021 21:51:33 +0100 Subject: [PATCH] Improve the check for "slow" GPUs (with regards to tex scaling). See #15238 --- Common/GPU/Vulkan/VulkanContext.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanContext.cpp b/Common/GPU/Vulkan/VulkanContext.cpp index 8f700c0b67..645e67898e 100644 --- a/Common/GPU/Vulkan/VulkanContext.cpp +++ b/Common/GPU/Vulkan/VulkanContext.cpp @@ -693,10 +693,20 @@ VkResult VulkanContext::CreateDevice() { break; case VULKAN_VENDOR_ARM: + devicePerfClass_ = PerfClass::SLOW; + { + // Parse the device name as an ultra rough heuristic. + int maliG = 0; + if (sscanf(props.deviceName, "Mali-G%d", &maliG) == 1) { + if (maliG >= 72) { + devicePerfClass_ = PerfClass::FAST; + } + } + } + break; + case VULKAN_VENDOR_QUALCOMM: devicePerfClass_ = PerfClass::SLOW; - // I haven't seen the bad compute shader slowdowns on any Android 11 device, so let's do - // a really silly heuristic here, and improve as needed. #if PPSSPP_PLATFORM(ANDROID) if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 30) { devicePerfClass_ = PerfClass::FAST;