From d066fbbaedc308b508a9a6b7f0ee25524d906ba2 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 19 Jul 2023 20:51:19 +0200 Subject: [PATCH] [d3d11] Set up line rasterization mode appropriately --- src/d3d11/d3d11_rasterizer.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_rasterizer.cpp b/src/d3d11/d3d11_rasterizer.cpp index f3c31694..0b347a9b 100644 --- a/src/d3d11/d3d11_rasterizer.cpp +++ b/src/d3d11/d3d11_rasterizer.cpp @@ -44,8 +44,16 @@ namespace dxvk { m_depthBias.depthBiasSlope = desc.SlopeScaledDepthBias; m_depthBias.depthBiasClamp = desc.DepthBiasClamp; - if (desc.AntialiasedLineEnable) - Logger::err("D3D11RasterizerState: Antialiased lines not supported"); + // Set up line rasterization mode + const auto& features = device->GetDXVKDevice()->features(); + + if (desc.MultisampleEnable) { + if (features.extLineRasterization.rectangularLines) + m_state.lineMode = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT; + } else if (desc.AntialiasedLineEnable) { + if (features.extLineRasterization.smoothLines) + m_state.lineMode = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT; + } }