From 0d84ebd4c9c180eddf3de5c42921fa963052338f Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 17 Jan 2019 01:58:03 +0100 Subject: [PATCH] [dxvk] DepthClampEnable -> DepthClipEnable There are subtle differences between the two that we should deal with in the backend at some point. --- src/d3d11/d3d11_rasterizer.cpp | 2 +- src/d3d11/d3d11_swapchain.cpp | 2 +- src/dxvk/dxvk_constant_state.h | 2 +- src/dxvk/dxvk_context.cpp | 2 +- src/dxvk/dxvk_graphics.cpp | 2 +- src/dxvk/dxvk_graphics.h | 2 +- src/dxvk/hud/dxvk_hud.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/d3d11/d3d11_rasterizer.cpp b/src/d3d11/d3d11_rasterizer.cpp index aee5a7f5f..faf28e25d 100644 --- a/src/d3d11/d3d11_rasterizer.cpp +++ b/src/d3d11/d3d11_rasterizer.cpp @@ -48,7 +48,7 @@ namespace dxvk { m_state.depthBiasConstant = static_cast(desc.DepthBias); m_state.depthBiasClamp = desc.DepthBiasClamp; m_state.depthBiasSlope = desc.SlopeScaledDepthBias; - m_state.depthClampEnable = desc.DepthClipEnable ? VK_FALSE : VK_TRUE; + m_state.depthClipEnable = desc.DepthClipEnable; m_state.sampleCount = VkSampleCountFlags(desc.ForcedSampleCount); if (desc.AntialiasedLineEnable) diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index f95bc2e84..9201001d0 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -572,7 +572,7 @@ namespace dxvk { m_rsState.polygonMode = VK_POLYGON_MODE_FILL; m_rsState.cullMode = VK_CULL_MODE_BACK_BIT; m_rsState.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; - m_rsState.depthClampEnable = VK_FALSE; + m_rsState.depthClipEnable = VK_FALSE; m_rsState.depthBiasEnable = VK_FALSE; m_rsState.depthBiasConstant = 0.0f; m_rsState.depthBiasClamp = 0.0f; diff --git a/src/dxvk/dxvk_constant_state.h b/src/dxvk/dxvk_constant_state.h index 8ca573d0d..1d98c6991 100644 --- a/src/dxvk/dxvk_constant_state.h +++ b/src/dxvk/dxvk_constant_state.h @@ -53,7 +53,7 @@ namespace dxvk { VkPolygonMode polygonMode; VkCullModeFlags cullMode; VkFrontFace frontFace; - VkBool32 depthClampEnable; + VkBool32 depthClipEnable; VkBool32 depthBiasEnable; float depthBiasConstant; float depthBiasClamp; diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 2969a4a6d..d78395e67 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -1652,7 +1652,7 @@ namespace dxvk { void DxvkContext::setRasterizerState(const DxvkRasterizerState& rs) { - m_state.gp.state.rsDepthClampEnable = rs.depthClampEnable; + m_state.gp.state.rsDepthClipEnable = rs.depthClipEnable; m_state.gp.state.rsDepthBiasEnable = rs.depthBiasEnable; m_state.gp.state.rsPolygonMode = rs.polygonMode; m_state.gp.state.rsCullMode = rs.cullMode; diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp index 9d20b4ac2..354935109 100644 --- a/src/dxvk/dxvk_graphics.cpp +++ b/src/dxvk/dxvk_graphics.cpp @@ -319,7 +319,7 @@ namespace dxvk { rsInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; rsInfo.pNext = nullptr; rsInfo.flags = 0; - rsInfo.depthClampEnable = state.rsDepthClampEnable; + rsInfo.depthClampEnable = !state.rsDepthClipEnable; rsInfo.rasterizerDiscardEnable = rasterizedStream < 0; rsInfo.polygonMode = state.rsPolygonMode; rsInfo.cullMode = state.rsCullMode; diff --git a/src/dxvk/dxvk_graphics.h b/src/dxvk/dxvk_graphics.h index 6e4acd6e6..f30683b56 100644 --- a/src/dxvk/dxvk_graphics.h +++ b/src/dxvk/dxvk_graphics.h @@ -81,7 +81,7 @@ namespace dxvk { VkVertexInputBindingDescription ilBindings[DxvkLimits::MaxNumVertexBindings]; uint32_t ilDivisors[DxvkLimits::MaxNumVertexBindings]; - VkBool32 rsDepthClampEnable; + VkBool32 rsDepthClipEnable; VkBool32 rsDepthBiasEnable; VkPolygonMode rsPolygonMode; VkCullModeFlags rsCullMode; diff --git a/src/dxvk/hud/dxvk_hud.cpp b/src/dxvk/hud/dxvk_hud.cpp index f48aa0395..be422c161 100644 --- a/src/dxvk/hud/dxvk_hud.cpp +++ b/src/dxvk/hud/dxvk_hud.cpp @@ -19,7 +19,7 @@ namespace dxvk::hud { m_rsState.polygonMode = VK_POLYGON_MODE_FILL; m_rsState.cullMode = VK_CULL_MODE_BACK_BIT; m_rsState.frontFace = VK_FRONT_FACE_CLOCKWISE; - m_rsState.depthClampEnable = VK_FALSE; + m_rsState.depthClipEnable = VK_FALSE; m_rsState.depthBiasEnable = VK_FALSE; m_rsState.depthBiasConstant = 0.0f; m_rsState.depthBiasClamp = 0.0f;