mirror of https://github.com/PCSX2/pcsx2.git
GS:MTL: Disable blending when color isn't written
Can come up in two-pass alpha, and Metal doesn't like it if blending uses SRC1 and your shader doesn't output it
This commit is contained in:
parent
3a97688804
commit
bd3e1299a3
|
@ -1129,6 +1129,8 @@ static MTLBlendOperation ConvertBlendOp(GSDevice::BlendOp generic)
|
|||
}
|
||||
}
|
||||
|
||||
static constexpr MTLColorWriteMask MTLColorWriteMaskRGB = MTLColorWriteMaskRed | MTLColorWriteMaskGreen | MTLColorWriteMaskBlue;
|
||||
|
||||
void GSDeviceMTL::MRESetHWPipelineState(GSHWDrawConfig::VSSelector vssel, GSHWDrawConfig::PSSelector pssel, GSHWDrawConfig::BlendState blend, GSHWDrawConfig::ColorMaskSelector cms)
|
||||
{
|
||||
PipelineSelectorExtrasMTL extras(blend, m_current_render.color_target, cms, m_current_render.depth_target, m_current_render.stencil_target);
|
||||
|
@ -1224,7 +1226,7 @@ void GSDeviceMTL::MRESetHWPipelineState(GSHWDrawConfig::VSSelector vssel, GSHWDr
|
|||
color.sourceRGBBlendFactor = MTLBlendFactorOne;
|
||||
color.destinationRGBBlendFactor = MTLBlendFactorOne;
|
||||
}
|
||||
else if (extras.blend_enable)
|
||||
else if (extras.blend_enable && (extras.writemask & MTLColorWriteMaskRGB))
|
||||
{
|
||||
color.blendingEnabled = YES;
|
||||
color.rgbBlendOperation = ConvertBlendOp(extras.blend_op);
|
||||
|
|
Loading…
Reference in New Issue