Skip to content

Commit

Permalink
[d3d11] Set up line rasterization mode appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Jul 19, 2023
1 parent 07188f2 commit ab56dcb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/d3d11/d3d11_rasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}


Expand Down

0 comments on commit ab56dcb

Please sign in to comment.