From 7ea1584b12118fb12a5105edc83744cbbe0feaff Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Wed, 18 Sep 2024 00:28:08 -0700 Subject: [PATCH] vulkan: Only reduze viewport minDepth if using depth clip control. --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 23f60da13f..dfae08a0d3 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -343,7 +343,10 @@ void Rasterizer::UpdateViewportScissorState() { boost::container::static_vector scissors; const float reduce_z = - regs.clipper_control.clip_space == AmdGpu::Liverpool::ClipSpace::MinusWToW ? 1.0f : 0.0f; + instance.IsDepthClipControlSupported() && + regs.clipper_control.clip_space == AmdGpu::Liverpool::ClipSpace::MinusWToW + ? 1.0f + : 0.0f; for (u32 i = 0; i < Liverpool::NumViewports; i++) { const auto& vp = regs.viewports[i]; const auto& vp_d = regs.viewport_depths[i];