mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
D3D12_DEPTH_STENCIL_DESC DepthStencil;
|
||||
D3D12_RASTERIZER_DESC Rasterization;
|
||||
UINT SampleMask;
|
||||
|
||||
bool operator==(const D3D12PipelineProperties &in) const
|
||||
{
|
||||
|
@ -45,7 +46,7 @@ struct D3D12PipelineProperties
|
|||
return false;
|
||||
if (memcmp(&Rasterization, &in.Rasterization, sizeof(D3D12_RASTERIZER_DESC)))
|
||||
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.NumElements = (UINT)pipelineProperties.IASet.size();
|
||||
graphicPipelineStateDesc.SampleDesc.Count = 1;
|
||||
graphicPipelineStateDesc.SampleMask = UINT_MAX;
|
||||
graphicPipelineStateDesc.SampleMask = pipelineProperties.SampleMask;
|
||||
graphicPipelineStateDesc.NodeMask = 1;
|
||||
|
||||
extraData.first->CreateGraphicsPipelineState(&graphicPipelineStateDesc, IID_PPV_ARGS(&result->first));
|
||||
|
|
Loading…
Add table
Reference in a new issue