Use per-RT blend enable registers even when independent blend is disabled

The common blend enable register seems to be used for something else. This is required for blending to work correctly in OpenGL games
This commit is contained in:
Billy Laws 2022-07-29 19:58:27 +01:00
parent 048c2fdd29
commit 7fd9d347e3
2 changed files with 1 additions and 9 deletions

View File

@ -1572,11 +1572,6 @@ namespace skyline::gpu::interconnect {
blendState.pAttachments = commonRtBlendState.data();
}
void SetColorBlendEnabled(bool enable) {
for (auto &blend : commonRtBlendState)
blend.blendEnable = enable;
}
void SetColorBlendOp(maxwell3d::BlendOp op) {
auto vkOp{ConvertBlendOp(op)};
for (auto &blend : commonRtBlendState)
@ -1614,6 +1609,7 @@ namespace skyline::gpu::interconnect {
}
void SetColorBlendEnabled(u32 index, bool enable) {
commonRtBlendState[index].blendEnable = enable;
independentRtBlendState[index].blendEnable = enable;
}

View File

@ -407,10 +407,6 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
context.SetDstAlphaBlendFactor(alphaDstFactor);
})
ENGINE_STRUCT_CASE(blendStateCommon, enable, {
context.SetColorBlendEnabled(enable);
})
#define SET_COLOR_BLEND_ENABLE_CALLBACK(z, index, data) \
ENGINE_ARRAY_CASE(rtBlendEnable, index, { \
context.SetColorBlendEnabled(index, rtBlendEnable); \