From 431b623763e8f755d2bcc01d0725382284a42c11 Mon Sep 17 00:00:00 2001 From: Brian Degenhardt Date: Sun, 19 Jul 2026 10:10:52 -0700 Subject: [PATCH] GS: clean up compiler warnings in ROV heuristic and SW sync log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GSRendererHW: drop the dead heuristic inputs (colormask/atst/afail/ blend/date/ztst derivations) left from an earlier iteration of the ROV cost model — none feed multipass_color/depth. Recover from git if a fuller model returns. depth_to_color is only consumed by GL_PUSH, which compiles out of non-debug builds — mark [[maybe_unused]]. - GSRendererSW: s_n is u64; use PRIu64 in the LOG fprintf. Co-Authored-By: Claude --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 22 ++-------------------- pcsx2/GS/Renderers/SW/GSRendererSW.cpp | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 965499f635..e60635e4d0 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -7545,27 +7545,8 @@ void GSRendererHW::DetermineROVUsage(GSTextureCache::Target* rt, GSTextureCache: const bool color_write = rt && m_conf.colormask.wrgba != 0; const bool depth_write = ds && m_cached_ctx.DepthWrite(); - const u32 colormask = GSUtil::GetChannelMask(m_cached_ctx.FRAME.PSM) & m_conf.colormask.wrgba; - const bool colormask_needs_rt = colormask != 0xF; - - const u32 ate = m_cached_ctx.TEST.ATE; - const u32 atst = m_cached_ctx.TEST.ATST; - const u32 afail = m_cached_ctx.TEST.AFAIL; - - const bool afail_needs_rt = ate && ((afail == AFAIL_ZB_ONLY) || (afail == AFAIL_RGB_ONLY)); - const bool afail_needs_depth = ate && ((afail == AFAIL_FB_ONLY) || (afail == AFAIL_RGB_ONLY)); - - const bool blend = m_conf.IsBlending(); - const bool blend_needs_rt = blend && - (m_optimized_blend.A == ALPHA_ABD_CD || m_optimized_blend.B == ALPHA_ABD_CD || - m_optimized_blend.C == ALPHA_C_AD || m_optimized_blend.D == ALPHA_ABD_CD); - const bool two_pass_alpha = GSHWDrawConfig::HasAlphaTestSecondPass(m_conf.alpha_test); - const bool date = m_conf.destination_alpha != GSHWDrawConfig::DestinationAlphaMode::Off; - - const bool ztst = m_cached_ctx.DepthRead(); - const bool full_barrier = m_conf.require_full_barrier; // Heuristically determine what ROVs would be needed to eliminate passes based on the current config. @@ -7824,7 +7805,8 @@ void GSRendererHW::ConvertDepthFormatROV(GSTextureCache::Target* ds) GSTexture* ds_tex_new = nullptr; // Convert depth to depth color or vice versa if needed. - bool depth_to_color; + // (Only consumed by GL_PUSH, which compiles out of non-debug builds.) + [[maybe_unused]] bool depth_to_color; if (m_conf.ps.HasDepthROV() && !ds_tex_old->IsDepthColor()) { depth_to_color = true; diff --git a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp index cc4f076db7..06c0d26aa4 100644 --- a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp @@ -724,7 +724,7 @@ void GSRendererSW::Sync(int reason) if constexpr (LOG) { - fprintf(s_fp, "sync n=%lld r=%d t=%" PRIu64 " p=%d %c\n", s_n, reason, t, pixels, t > 10000000 ? '*' : ' '); + fprintf(s_fp, "sync n=%" PRIu64 " r=%d t=%" PRIu64 " p=%d %c\n", s_n, reason, t, pixels, t > 10000000 ? '*' : ' '); fflush(s_fp); }