From 20e1f773fce4b999ffb123d7f0d21488b622feb2 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Mon, 24 Jul 2023 18:16:53 +0100 Subject: [PATCH] GS/HW: Mark alpha invalid on framebuffer resize. --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 8918d08ec7..6569fbab6d 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -2383,6 +2383,15 @@ void GSRendererHW::Draw() { if (rt && (!is_possible_mem_clear || rt->m_TEX0.PSM != FRAME_TEX0.PSM)) { + if (rt->m_TEX0.TBW != FRAME_TEX0.TBW && !m_cached_ctx.ZBUF.ZMSK && (m_cached_ctx.FRAME.FBMSK & 0xFF000000)) + { + // Alpha could be a font, and since the width is changing it's no longer valid. + // Be careful of downsize copies or other effects, checking Z MSK should hopefully be enough.. (Okami). + if (m_cached_ctx.FRAME.FBMSK & 0x0F000000) + rt->m_valid_alpha_low = false; + if (m_cached_ctx.FRAME.FBMSK & 0xF0000000) + rt->m_valid_alpha_high = false; + } rt->m_TEX0 = FRAME_TEX0; }