From 6e3cb5dfdc39160c9ce17b679931eee946f2d869 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 17 Jan 2018 19:39:06 +0100 Subject: [PATCH] [d3d11] Enable depth clamp This is technically incorrect, but Tomb Raider requires this to render parts of the UI. --- src/d3d11/d3d11_rasterizer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/d3d11/d3d11_rasterizer.cpp b/src/d3d11/d3d11_rasterizer.cpp index 3167ac5db..45072b7aa 100644 --- a/src/d3d11/d3d11_rasterizer.cpp +++ b/src/d3d11/d3d11_rasterizer.cpp @@ -9,7 +9,6 @@ namespace dxvk { : m_device(device), m_desc(desc) { // State that is not supported in D3D11 - m_state.enableDepthClamp = VK_FALSE; m_state.enableDiscard = VK_FALSE; // Polygon mode. Determines whether the rasterizer fills @@ -51,11 +50,10 @@ namespace dxvk { m_state.depthBiasConstant = static_cast(desc.DepthBias); m_state.depthBiasClamp = desc.DepthBiasClamp; m_state.depthBiasSlope = desc.SlopeScaledDepthBias; + m_state.enableDepthClamp = desc.DepthClipEnable ? VK_FALSE : VK_TRUE; - // TODO implement depth clamp. Note that there are differences - // between D3D11 depth clip (disabled) and Vulkan depth clamp. if (!desc.DepthClipEnable) - Logger::err("D3D11RasterizerState: Depth clamp not supported"); + Logger::warn("D3D11RasterizerState: Depth clamp not properly supported"); if (desc.AntialiasedLineEnable) Logger::err("D3D11RasterizerState: Antialiased lines not supported");