From 1cfc7b11b81628638fb0bb1fb56ea678ae9000c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 11 Jan 2023 22:59:30 +0100 Subject: [PATCH] Only force indexed draws on PowerVR / Vulkan. --- Common/GPU/Vulkan/thin3d_vulkan.cpp | 5 +++++ Common/GPU/thin3d.h | 2 ++ GPU/Vulkan/DrawEngineVulkan.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Common/GPU/Vulkan/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp index dad576faba..63fb5f2eca 100644 --- a/Common/GPU/Vulkan/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -861,6 +861,11 @@ VKContext::VKContext(VulkanContext *vulkan) break; } + if (caps_.vendor == GPUVendor::VENDOR_IMGTEC) { + // Enable some things that cut down pipeline counts but may have other costs. + caps_.verySlowShaderCompiler = true; + } + // Hide D3D9 when we know it likely won't work well. #if PPSSPP_PLATFORM(WINDOWS) caps_.supportsD3D9 = true; diff --git a/Common/GPU/thin3d.h b/Common/GPU/thin3d.h index 2cd58fe4ee..bf10cb3801 100644 --- a/Common/GPU/thin3d.h +++ b/Common/GPU/thin3d.h @@ -577,6 +577,8 @@ struct DeviceCaps { bool isTilingGPU; // This means that it benefits from correct store-ops, msaa without backing memory, etc. bool sampleRateShadingSupported; + bool verySlowShaderCompiler; + // From the other backends, we can detect if D3D9 support is known bad (like on Xe) and disable it. bool supportsD3D9; diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 311618491b..15e259a251 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -584,7 +584,7 @@ void DrawEngineVulkan::DoFlush() { // The optimization to avoid indexing isn't really worth it on Vulkan since it means creating more pipelines. // This could be avoided with the new dynamic state extensions, but not available enough on mobile. - const bool forceIndexed = true; + const bool forceIndexed = draw_->GetDeviceCaps().verySlowShaderCompiler; if (useHWTransform) { int vertexCount = 0;