From 12e578b93cb3cd0631b3754026ef49ff06d81194 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 3 Mar 2023 02:06:30 +1000 Subject: [PATCH] GS/Vulkan: Don't skip barrier with colclip+readwrite date Value written from HDR setup must be visible for any DATE reads. Fixes flickering in DBZ BT2. --- pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp index d5e9db1fa4..680692b871 100644 --- a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp +++ b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp @@ -3155,8 +3155,9 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config) } // We don't need the very first barrier if this is the first draw after switching to feedback loop, - // because the layout change in itself enforces the execution dependency. - const bool skip_first_barrier = (draw_rt && draw_rt->GetLayout() != VK_IMAGE_LAYOUT_GENERAL); + // because the layout change in itself enforces the execution dependency. HDR needs a barrier between + // setup and the first draw to read it. TODO: Make HDR use subpasses instead. + const bool skip_first_barrier = (draw_rt && draw_rt->GetLayout() != VK_IMAGE_LAYOUT_GENERAL && !pipe.ps.hdr); OMSetRenderTargets(draw_rt, draw_ds, config.scissor, pipe.feedback_loop); if (pipe.feedback_loop)