summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D12
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2021-03-07 00:21:11 -0500
committerGitHub <noreply@github.com>2021-03-07 00:21:11 -0500
commit089250fde65c2e225681c0ef6917d28fa187e8de (patch)
treebcbb6db025c6003bd681e0028f0bc3b7b223bd07 /Source/Core/VideoBackends/D3D12
parent5f7d935b0a40f5cece7341927bd92b6a8d5debbe (diff)
parentdf81210e96c6603d3aeb6c76f51b030d06cd06ac (diff)
Merge pull request #9497 from Pokechu22/better-fifo-analyzer
Graphics refactoring + add names and descriptions in FIFO analyzer
Diffstat (limited to 'Source/Core/VideoBackends/D3D12')
-rw-r--r--Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp b/Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp
index dfce47a2fb..4cd75c10e5 100644
--- a/Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp
+++ b/Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp
@@ -66,7 +66,7 @@ static void GetD3DRasterizerDesc(D3D12_RASTERIZER_DESC* desc, const Rasterizatio
{D3D12_CULL_MODE_NONE, D3D12_CULL_MODE_BACK, D3D12_CULL_MODE_FRONT, D3D12_CULL_MODE_FRONT}};
desc->FillMode = D3D12_FILL_MODE_SOLID;
- desc->CullMode = cull_modes[rs_state.cullmode];
+ desc->CullMode = cull_modes[u32(rs_state.cullmode.Value())];
desc->MultisampleEnable = fb_state.samples > 1;
}
@@ -80,7 +80,7 @@ static void GetD3DDepthDesc(D3D12_DEPTH_STENCIL_DESC* desc, const DepthState& st
D3D12_COMPARISON_FUNC_ALWAYS}};
desc->DepthEnable = state.testenable;
- desc->DepthFunc = compare_funcs[state.func];
+ desc->DepthFunc = compare_funcs[u32(state.func.Value())];
desc->DepthWriteMask =
state.updateenable ? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
}
@@ -135,24 +135,24 @@ static void GetD3DBlendDesc(D3D12_BLEND_DESC* desc, const BlendingState& state)
rtblend->BlendOpAlpha = state.subtractAlpha ? D3D12_BLEND_OP_REV_SUBTRACT : D3D12_BLEND_OP_ADD;
if (state.usedualsrc)
{
- rtblend->SrcBlend = src_dual_src_factors[state.srcfactor];
- rtblend->SrcBlendAlpha = src_dual_src_factors[state.srcfactoralpha];
- rtblend->DestBlend = dst_dual_src_factors[state.dstfactor];
- rtblend->DestBlendAlpha = dst_dual_src_factors[state.dstfactoralpha];
+ rtblend->SrcBlend = src_dual_src_factors[u32(state.srcfactor.Value())];
+ rtblend->SrcBlendAlpha = src_dual_src_factors[u32(state.srcfactoralpha.Value())];
+ rtblend->DestBlend = dst_dual_src_factors[u32(state.dstfactor.Value())];
+ rtblend->DestBlendAlpha = dst_dual_src_factors[u32(state.dstfactoralpha.Value())];
}
else
{
- rtblend->SrcBlend = src_factors[state.srcfactor];
- rtblend->SrcBlendAlpha = src_factors[state.srcfactoralpha];
- rtblend->DestBlend = dst_factors[state.dstfactor];
- rtblend->DestBlendAlpha = dst_factors[state.dstfactoralpha];
+ rtblend->SrcBlend = src_factors[u32(state.srcfactor.Value())];
+ rtblend->SrcBlendAlpha = src_factors[u32(state.srcfactoralpha.Value())];
+ rtblend->DestBlend = dst_factors[u32(state.dstfactor.Value())];
+ rtblend->DestBlendAlpha = dst_factors[u32(state.dstfactoralpha.Value())];
}
}
else
{
rtblend->LogicOpEnable = state.logicopenable;
if (state.logicopenable)
- rtblend->LogicOp = logic_ops[state.logicmode];
+ rtblend->LogicOp = logic_ops[u32(state.logicmode.Value())];
}
}