diff --git a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp index a06b3da8c2..fd5c63a9f7 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp @@ -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)); diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h index 8edd38f3a8..0b0326b806 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h @@ -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));