diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-02-10 18:11:31 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-03-06 19:27:19 -0800 |
| commit | 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 (patch) | |
| tree | 48fae2cac1ed47ec5912dca4bf00716509192225 /Source/Core/VideoBackends/D3D/D3DState.cpp | |
| parent | db8ced7e4e4724c38f148ee449c346e447dd3942 (diff) | |
Convert BPMemory to BitField and enum class
Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DState.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DState.cpp | 14 |
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 { |
