summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/D3DState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DState.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DState.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DState.cpp b/Source/Core/VideoBackends/D3D/D3DState.cpp
index b345de0a38..b542c2b3de 100644
--- a/Source/Core/VideoBackends/D3D/D3DState.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DState.cpp
@@ -378,7 +378,7 @@ ID3D11BlendState* StateCache::Get(BlendingState state)
D3D11_LOGIC_OP_COPY_INVERTED, D3D11_LOGIC_OP_OR_INVERTED, D3D11_LOGIC_OP_NAND,
D3D11_LOGIC_OP_SET}};
tdesc.LogicOpEnable = TRUE;
- tdesc.LogicOp = logic_ops[state.logicmode];
+ tdesc.LogicOp = logic_ops[u32(state.logicmode.Value())];
ComPtr<ID3D11BlendState1> res;
HRESULT hr = D3D::device1->CreateBlendState1(&desc, res.GetAddressOf());
@@ -416,10 +416,10 @@ ID3D11BlendState* StateCache::Get(BlendingState state)
use_dual_source ? D3D11_BLEND_INV_SRC1_ALPHA : D3D11_BLEND_INV_SRC_ALPHA,
D3D11_BLEND_DEST_ALPHA, D3D11_BLEND_INV_DEST_ALPHA}};
- tdesc.SrcBlend = src_factors[state.srcfactor];
- tdesc.SrcBlendAlpha = src_factors[state.srcfactoralpha];
- tdesc.DestBlend = dst_factors[state.dstfactor];
- tdesc.DestBlendAlpha = dst_factors[state.dstfactoralpha];
+ tdesc.SrcBlend = src_factors[u32(state.srcfactor.Value())];
+ tdesc.SrcBlendAlpha = src_factors[u32(state.srcfactoralpha.Value())];
+ tdesc.DestBlend = dst_factors[u32(state.dstfactor.Value())];
+ tdesc.DestBlendAlpha = dst_factors[u32(state.dstfactoralpha.Value())];
tdesc.BlendOp = state.subtract ? D3D11_BLEND_OP_REV_SUBTRACT : D3D11_BLEND_OP_ADD;
tdesc.BlendOpAlpha = state.subtractAlpha ? D3D11_BLEND_OP_REV_SUBTRACT : D3D11_BLEND_OP_ADD;
@@ -441,7 +441,7 @@ ID3D11RasterizerState* StateCache::Get(RasterizationState state)
D3D11_RASTERIZER_DESC desc = {};
desc.FillMode = D3D11_FILL_SOLID;
- desc.CullMode = cull_modes[state.cullmode];
+ desc.CullMode = cull_modes[u32(state.cullmode.Value())];
desc.ScissorEnable = TRUE;
ComPtr<ID3D11RasterizerState> res;
@@ -477,7 +477,7 @@ ID3D11DepthStencilState* StateCache::Get(DepthState state)
depthdc.DepthEnable = TRUE;
depthdc.DepthWriteMask =
state.updateenable ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO;
- depthdc.DepthFunc = d3dCmpFuncs[state.func];
+ depthdc.DepthFunc = d3dCmpFuncs[u32(state.func.Value())];
}
else
{