mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Clean up rasterizer state initialization
The error messages are pointless since all of this is already handled in NormalizeDesc.
This commit is contained in:
parent
06c144f075
commit
2afe5ec141
@ -9,32 +9,20 @@ namespace dxvk {
|
|||||||
: m_device(device), m_desc(desc), m_d3d10(this) {
|
: m_device(device), m_desc(desc), m_d3d10(this) {
|
||||||
// Polygon mode. Determines whether the rasterizer fills
|
// Polygon mode. Determines whether the rasterizer fills
|
||||||
// a polygon or renders lines connecting the vertices.
|
// a polygon or renders lines connecting the vertices.
|
||||||
m_state.polygonMode = VK_POLYGON_MODE_FILL;
|
|
||||||
|
|
||||||
switch (desc.FillMode) {
|
switch (desc.FillMode) {
|
||||||
case D3D11_FILL_WIREFRAME: m_state.polygonMode = VK_POLYGON_MODE_LINE; break;
|
|
||||||
case D3D11_FILL_SOLID: m_state.polygonMode = VK_POLYGON_MODE_FILL; break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Logger::err(str::format(
|
case D3D11_FILL_SOLID: m_state.polygonMode = VK_POLYGON_MODE_FILL; break;
|
||||||
"D3D11RasterizerState: Unsupported fill mode: ",
|
case D3D11_FILL_WIREFRAME: m_state.polygonMode = VK_POLYGON_MODE_LINE; break;
|
||||||
desc.FillMode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Face culling properties. The rasterizer may discard
|
// Face culling properties. The rasterizer may discard
|
||||||
// polygons that are facing towards or away from the
|
// polygons that are facing towards or away from the
|
||||||
// viewer, depending on the options below.
|
// viewer, depending on the options below.
|
||||||
m_state.cullMode = VK_CULL_MODE_NONE;
|
|
||||||
|
|
||||||
switch (desc.CullMode) {
|
switch (desc.CullMode) {
|
||||||
|
default:
|
||||||
case D3D11_CULL_NONE: m_state.cullMode = VK_CULL_MODE_NONE; break;
|
case D3D11_CULL_NONE: m_state.cullMode = VK_CULL_MODE_NONE; break;
|
||||||
case D3D11_CULL_FRONT: m_state.cullMode = VK_CULL_MODE_FRONT_BIT; break;
|
case D3D11_CULL_FRONT: m_state.cullMode = VK_CULL_MODE_FRONT_BIT; break;
|
||||||
case D3D11_CULL_BACK: m_state.cullMode = VK_CULL_MODE_BACK_BIT; break;
|
case D3D11_CULL_BACK: m_state.cullMode = VK_CULL_MODE_BACK_BIT; break;
|
||||||
|
|
||||||
default:
|
|
||||||
Logger::err(str::format(
|
|
||||||
"D3D11RasterizerState: Unsupported cull mode: ",
|
|
||||||
desc.CullMode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_state.frontFace = desc.FrontCounterClockwise
|
m_state.frontFace = desc.FrontCounterClockwise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user