From 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 10 Feb 2021 18:11:31 -0800 Subject: 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. --- Source/Core/VideoBackends/D3D/D3DState.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/Core/VideoBackends/D3D/D3DState.cpp') 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 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 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 { -- cgit v1.2.3