mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 18:50:55 +00:00
d3d12: Add color masking
This commit is contained in:
parent
acb8f82f84
commit
bdeb08e045
2 changed files with 5 additions and 2 deletions
|
@ -847,6 +847,8 @@ bool D3D12GSRender::LoadProgram()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prop.SampleMask = m_color_mask_r | (m_color_mask_g << 1) | (m_color_mask_b << 2) | (m_color_mask_a << 3);
|
||||||
|
|
||||||
prop.IASet = m_IASet;
|
prop.IASet = m_IASet;
|
||||||
|
|
||||||
m_PSO = m_cachePSO.getGraphicPipelineState(m_cur_vertex_prog, m_cur_fragment_prog, prop, std::make_pair(m_device, m_rootSignatures));
|
m_PSO = m_cachePSO.getGraphicPipelineState(m_cur_vertex_prog, m_cur_fragment_prog, prop, std::make_pair(m_device, m_rootSignatures));
|
||||||
|
|
|
@ -19,6 +19,7 @@ struct D3D12PipelineProperties
|
||||||
unsigned numMRT : 3;
|
unsigned numMRT : 3;
|
||||||
D3D12_DEPTH_STENCIL_DESC DepthStencil;
|
D3D12_DEPTH_STENCIL_DESC DepthStencil;
|
||||||
D3D12_RASTERIZER_DESC Rasterization;
|
D3D12_RASTERIZER_DESC Rasterization;
|
||||||
|
UINT SampleMask;
|
||||||
|
|
||||||
bool operator==(const D3D12PipelineProperties &in) const
|
bool operator==(const D3D12PipelineProperties &in) const
|
||||||
{
|
{
|
||||||
|
@ -45,7 +46,7 @@ struct D3D12PipelineProperties
|
||||||
return false;
|
return false;
|
||||||
if (memcmp(&Rasterization, &in.Rasterization, sizeof(D3D12_RASTERIZER_DESC)))
|
if (memcmp(&Rasterization, &in.Rasterization, sizeof(D3D12_RASTERIZER_DESC)))
|
||||||
return false;
|
return false;
|
||||||
return Topology == in.Topology && DepthStencilFormat == in.DepthStencilFormat && numMRT == in.numMRT;
|
return Topology == in.Topology && DepthStencilFormat == in.DepthStencilFormat && numMRT == in.numMRT && SampleMask == in.SampleMask;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -160,7 +161,7 @@ struct D3D12Traits
|
||||||
graphicPipelineStateDesc.InputLayout.pInputElementDescs = pipelineProperties.IASet.data();
|
graphicPipelineStateDesc.InputLayout.pInputElementDescs = pipelineProperties.IASet.data();
|
||||||
graphicPipelineStateDesc.InputLayout.NumElements = (UINT)pipelineProperties.IASet.size();
|
graphicPipelineStateDesc.InputLayout.NumElements = (UINT)pipelineProperties.IASet.size();
|
||||||
graphicPipelineStateDesc.SampleDesc.Count = 1;
|
graphicPipelineStateDesc.SampleDesc.Count = 1;
|
||||||
graphicPipelineStateDesc.SampleMask = UINT_MAX;
|
graphicPipelineStateDesc.SampleMask = pipelineProperties.SampleMask;
|
||||||
graphicPipelineStateDesc.NodeMask = 1;
|
graphicPipelineStateDesc.NodeMask = 1;
|
||||||
|
|
||||||
extraData.first->CreateGraphicsPipelineState(&graphicPipelineStateDesc, IID_PPV_ARGS(&result->first));
|
extraData.first->CreateGraphicsPipelineState(&graphicPipelineStateDesc, IID_PPV_ARGS(&result->first));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue