GS/HW: Check if alpha second pass copies are feedback loops.

This commit is contained in:
lightningterror
2026-05-01 20:35:30 +02:00
parent 93f1fcbe88
commit 4fa9c4e382
4 changed files with 10 additions and 8 deletions
+3 -2
View File
@@ -2945,7 +2945,8 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
}
const bool tex_is_fb = config.tex && config.tex == draw_rt;
if (draw_rt && (((config.require_one_barrier || (config.require_full_barrier && m_features.multidraw_fb_copy)) && config.ps.IsFeedbackLoopRT()) || tex_is_fb))
if (draw_rt && (((config.require_one_barrier || (config.require_full_barrier && m_features.multidraw_fb_copy)) &&
(config.ps.IsFeedbackLoopRT() || config.alpha_second_pass.ps.IsFeedbackLoopRT())) || tex_is_fb))
{
config.require_one_barrier |= (tex_is_fb && !config.require_full_barrier);
@@ -2956,7 +2957,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
}
if (draw_ds && (config.require_one_barrier || (config.require_full_barrier && m_features.multidraw_fb_copy)) &&
m_features.depth_feedback && config.ps.IsFeedbackLoopDepth())
m_features.depth_feedback && (config.ps.IsFeedbackLoopDepth() || config.alpha_second_pass.ps.IsFeedbackLoopDepth()))
{
// Requires a copy of the DS.
draw_ds_clone = CreateTexture(rtsize.x, rtsize.y, 1, draw_ds->GetFormat(), true);
+2 -2
View File
@@ -4371,8 +4371,8 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
GSTexture12* draw_ds_as_rt = static_cast<GSTexture12*>(m_ds_as_rt);
const bool feedback_rt = draw_rt && (((config.require_one_barrier || (config.require_full_barrier && m_features.texture_barrier)) && config.ps.IsFeedbackLoopRT()) ||
(config.tex && config.tex == config.rt));
const bool feedback_rt = draw_rt && (((config.require_one_barrier || (config.require_full_barrier && m_features.texture_barrier)) && (config.ps.IsFeedbackLoopRT() ||
config.alpha_second_pass.ps.IsFeedbackLoopRT())) || (config.tex && config.tex == config.rt));
const bool feedback_depth = draw_ds_as_rt != nullptr;
if (feedback_rt && !m_features.texture_barrier)
+3 -3
View File
@@ -2932,8 +2932,8 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
}
const bool tex_is_fb = config.tex && config.tex == draw_rt;
if (draw_rt && (((config.require_one_barrier || (config.require_full_barrier && m_features.multidraw_fb_copy)) && config.ps.IsFeedbackLoopRT()) ||
tex_is_fb) && !m_features.texture_barrier)
if (draw_rt && (((config.require_one_barrier || (config.require_full_barrier && m_features.multidraw_fb_copy)) &&
(config.ps.IsFeedbackLoopRT() || config.alpha_second_pass.ps.IsFeedbackLoopRT())) || tex_is_fb) && !m_features.texture_barrier)
{
config.require_one_barrier |= (tex_is_fb && !config.require_full_barrier);
@@ -2944,7 +2944,7 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
}
if (draw_ds && (config.require_one_barrier || (config.require_full_barrier && m_features.multidraw_fb_copy)) &&
!m_features.texture_barrier && m_features.depth_feedback && config.ps.IsFeedbackLoopDepth())
!m_features.texture_barrier && m_features.depth_feedback && (config.ps.IsFeedbackLoopDepth() || config.alpha_second_pass.ps.IsFeedbackLoopDepth()))
{
// Requires a copy of the DS.
draw_ds_clone = CreateTexture(rtsize.x, rtsize.y, 1, draw_ds->GetFormat(), true);
+2 -1
View File
@@ -5992,7 +5992,8 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
pipe.feedback_loop_flags |= m_current_framebuffer_feedback_loop;
}
if (draw_rt && ((config.require_one_barrier && config.ps.IsFeedbackLoopRT()) || (config.tex && config.tex == config.rt)) && !m_features.texture_barrier)
if (draw_rt && ((config.require_one_barrier && (config.ps.IsFeedbackLoopRT() || config.alpha_second_pass.ps.IsFeedbackLoopRT())) ||
(config.tex && config.tex == config.rt)) && !m_features.texture_barrier)
{
// Requires a copy of the RT.
draw_rt_clone = static_cast<GSTextureVK*>(CreateTexture(rtsize.x, rtsize.y, 1, draw_rt->GetFormat(), true));