Skip to content

Commit

Permalink
vulkan: Only reduze viewport minDepth if using depth clip control.
Browse files Browse the repository at this point in the history
  • Loading branch information
squidbus committed Sep 18, 2024
1 parent 284add1 commit 7ea1584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video_core/renderer_vulkan/vk_rasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ void Rasterizer::UpdateViewportScissorState() {
boost::container::static_vector<vk::Rect2D, Liverpool::NumViewports> 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];
Expand Down

0 comments on commit 7ea1584

Please sign in to comment.