gpu: share pipelines when color and alpha blend equations match

This commit is contained in:
nmzik
2026-10-04 22:29:05 +04:00
parent f7bd0b436a
commit 96011cc5c9
3 changed files with 31 additions and 11 deletions
@@ -761,10 +761,7 @@ PipelineCache::Pipeline& PipelineCache::GetGraphicsPipeline(
case ShaderAlphaBlendSource::SourceAlpha:
blend.color_srcblend = RemapSourceAlphaFactor(blend.color_srcblend);
blend.color_destblend = RemapSourceAlphaFactor(blend.color_destblend);
if (blend.separate_alpha_blend) {
blend.alpha_srcblend = RemapSourceAlphaFactor(blend.alpha_srcblend);
blend.alpha_destblend = RemapSourceAlphaFactor(blend.alpha_destblend);
}
blend.separate_alpha_blend = false;
break;
case ShaderAlphaBlendSource::SourceAlphaOne:
// The second source carries the mapped source factor; its alpha stays logical Sa.