gpu: fix zero-source alpha blending on swizzled targets

Co-authored-by: Çağatay Güçlü <33038942+defektu@users.noreply.github.com>
This commit is contained in:
nmzikandÇağatay Güçlü committed 2026-10-05 02:24:51 +04:00
1 parent 8274e517b2
commit 94e7d239dd
7 files changed
+35 -10

No files matched your search

@@ -32,12 +32,15 @@ BlendMappingSupport ClassifyBlendMapping(const HW::BlendControl&
}
if (blend.separate_alpha_blend &&
blend.color_srcblend == static_cast<uint8_t>(Prospero::BlendFactor::kSrcAlpha) &&
blend.alpha_srcblend == static_cast<uint8_t>(Prospero::BlendFactor::kOne) &&
blend.color_destblend == static_cast<uint8_t>(Prospero::BlendFactor::kOneMinusSrcAlpha) &&
blend.alpha_destblend == blend.color_destblend &&
blend.color_comb_fcn == static_cast<uint8_t>(Prospero::BlendOp::kAdd) &&
blend.alpha_comb_fcn == blend.color_comb_fcn) {
return BlendMappingSupport::SourceAlphaOne;
switch (static_cast<Prospero::BlendFactor>(blend.alpha_srcblend)) {
case Prospero::BlendFactor::kZero: return BlendMappingSupport::SourceAlphaZero;
case Prospero::BlendFactor::kOne: return BlendMappingSupport::SourceAlphaOne;
default: break;
}
}
// Moving alpha requires the same equation for all channels.
if (blend.separate_alpha_blend && (blend.alpha_srcblend != blend.color_srcblend ||