From 59e422c5384a66671dc017a86e5c8a72dbc472d7 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 14 May 2026 15:51:00 +0200 Subject: [PATCH] GS/GL: Depth isn't written so we can skip a barrier. --- pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index 8d82687de7..cefef55b9c 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -2821,7 +2821,19 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config) SetupPipeline(psel); - bool rt_hazard_barrier = config.tex && (config.tex == config.ds || config.tex == config.rt); + bool rt_hazard_barrier = config.tex && config.tex == config.rt; + if (config.tex && config.tex == config.ds) + { + if (m_features.test_and_sample_depth && !config.depth.zwe && !config.ps.IsFeedbackLoopDepth() && !config.alpha_second_pass.ps.IsFeedbackLoopDepth()) + { + // Do nothing. + } + else if (m_features.texture_barrier) + rt_hazard_barrier = true; + else + config.tex = nullptr; + } + // In Time Crisis: // 1. Fullscreen sprite reads depth and writes alpha (rt_hazard_barrier true from config.ds == config.tex) // 2. Fullscreen sprite writes gray, rta hw blend blends based on dst alpha.