From 1d0082452818abe409b6b61890ae047d28d3384e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 26 Nov 2022 23:27:59 -0800 Subject: [PATCH] Vulkan: Only use geometry shaders with accurate z. Just to be safe, since that's what it's most well tested with. --- GPU/Vulkan/GPU_Vulkan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index 48b34baf9d..0c50c361bd 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -232,7 +232,8 @@ u32 GPU_Vulkan::CheckGPUFeatures() const { features |= GPU_USE_TEXTURE_FLOAT; // Fall back to geometry shader culling if we can't do vertex range culling. - if (draw_->GetDeviceCaps().geometryShaderSupported) { + // Checking accurate depth here because the old depth path is uncommon and not well tested for this. + if (draw_->GetDeviceCaps().geometryShaderSupported && (features & GPU_USE_ACCURATE_DEPTH) != 0) { const bool useGeometry = g_Config.bUseGeometryShader && !draw_->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN); const bool vertexSupported = draw_->GetDeviceCaps().clipDistanceSupported && draw_->GetDeviceCaps().cullDistanceSupported; if (useGeometry && (!vertexSupported || (features & GPU_USE_VS_RANGE_CULLING) == 0)) {