mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-24 00:49:18 +00:00
VideoBackends / VideoCommon: rename member variables in RenderState to be consistent
This commit is contained in:
parent
ab8a02566d
commit
14459bcc1b
25 changed files with 340 additions and 337 deletions
|
|
@ -365,16 +365,16 @@ ID3D11BlendState* StateCache::Get(BlendingState state)
|
|||
if (it != m_blend.end())
|
||||
return it->second.Get();
|
||||
|
||||
if (state.logicopenable && g_backend_info.bSupportsLogicOp)
|
||||
if (state.logic_op_enable && g_backend_info.bSupportsLogicOp)
|
||||
{
|
||||
D3D11_BLEND_DESC1 desc = {};
|
||||
D3D11_RENDER_TARGET_BLEND_DESC1& tdesc = desc.RenderTarget[0];
|
||||
if (state.colorupdate)
|
||||
if (state.color_update)
|
||||
tdesc.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN |
|
||||
D3D11_COLOR_WRITE_ENABLE_BLUE;
|
||||
else
|
||||
tdesc.RenderTargetWriteMask = 0;
|
||||
if (state.alphaupdate)
|
||||
if (state.alpha_update)
|
||||
tdesc.RenderTargetWriteMask |= D3D11_COLOR_WRITE_ENABLE_ALPHA;
|
||||
|
||||
static constexpr std::array<D3D11_LOGIC_OP, 16> logic_ops = {
|
||||
|
|
@ -384,7 +384,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[u32(state.logicmode.Value())];
|
||||
tdesc.LogicOp = logic_ops[u32(state.logic_mode.Value())];
|
||||
|
||||
ComPtr<ID3D11BlendState1> res;
|
||||
HRESULT hr = D3D::device1->CreateBlendState1(&desc, res.GetAddressOf());
|
||||
|
|
@ -400,17 +400,17 @@ ID3D11BlendState* StateCache::Get(BlendingState state)
|
|||
desc.IndependentBlendEnable = FALSE;
|
||||
|
||||
D3D11_RENDER_TARGET_BLEND_DESC& tdesc = desc.RenderTarget[0];
|
||||
tdesc.BlendEnable = state.blendenable;
|
||||
tdesc.BlendEnable = state.blend_enable;
|
||||
|
||||
if (state.colorupdate)
|
||||
if (state.color_update)
|
||||
tdesc.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN |
|
||||
D3D11_COLOR_WRITE_ENABLE_BLUE;
|
||||
else
|
||||
tdesc.RenderTargetWriteMask = 0;
|
||||
if (state.alphaupdate)
|
||||
if (state.alpha_update)
|
||||
tdesc.RenderTargetWriteMask |= D3D11_COLOR_WRITE_ENABLE_ALPHA;
|
||||
|
||||
const bool use_dual_source = state.usedualsrc;
|
||||
const bool use_dual_source = state.use_dual_src;
|
||||
const std::array<D3D11_BLEND, 8> src_factors = {
|
||||
{D3D11_BLEND_ZERO, D3D11_BLEND_ONE, D3D11_BLEND_DEST_COLOR, D3D11_BLEND_INV_DEST_COLOR,
|
||||
use_dual_source ? D3D11_BLEND_SRC1_ALPHA : D3D11_BLEND_SRC_ALPHA,
|
||||
|
|
@ -422,12 +422,12 @@ 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[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.SrcBlend = src_factors[u32(state.src_factor.Value())];
|
||||
tdesc.SrcBlendAlpha = src_factors[u32(state.src_factor_alpha.Value())];
|
||||
tdesc.DestBlend = dst_factors[u32(state.dst_factor.Value())];
|
||||
tdesc.DestBlendAlpha = dst_factors[u32(state.dst_factor_alpha.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;
|
||||
tdesc.BlendOpAlpha = state.subtract_alpha ? D3D11_BLEND_OP_REV_SUBTRACT : D3D11_BLEND_OP_ADD;
|
||||
|
||||
ComPtr<ID3D11BlendState> res;
|
||||
HRESULT hr = D3D::device->CreateBlendState(&desc, res.GetAddressOf());
|
||||
|
|
@ -447,7 +447,7 @@ ID3D11RasterizerState* StateCache::Get(RasterizationState state)
|
|||
|
||||
D3D11_RASTERIZER_DESC desc = {};
|
||||
desc.FillMode = D3D11_FILL_SOLID;
|
||||
desc.CullMode = cull_modes[u32(state.cullmode.Value())];
|
||||
desc.CullMode = cull_modes[u32(state.cull_mode.Value())];
|
||||
desc.ScissorEnable = TRUE;
|
||||
|
||||
ComPtr<ID3D11RasterizerState> res;
|
||||
|
|
@ -478,11 +478,11 @@ ID3D11DepthStencilState* StateCache::Get(DepthState state)
|
|||
D3D11_COMPARISON_GREATER_EQUAL, D3D11_COMPARISON_LESS, D3D11_COMPARISON_NOT_EQUAL,
|
||||
D3D11_COMPARISON_LESS_EQUAL, D3D11_COMPARISON_ALWAYS};
|
||||
|
||||
if (state.testenable)
|
||||
if (state.test_enable)
|
||||
{
|
||||
depthdc.DepthEnable = TRUE;
|
||||
depthdc.DepthWriteMask =
|
||||
state.updateenable ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO;
|
||||
state.update_enable ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO;
|
||||
depthdc.DepthFunc = d3dCmpFuncs[u32(state.func.Value())];
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue