diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index 133a7f6583..879b33edab 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -1529,6 +1529,7 @@ void GSDevice12::InsertDebugMessage(DebugMessageCategory category, const char* f bool GSDevice12::CheckFeatures(const u32& vendor_id) { //const bool isAMD = (vendor_id == 0x1002 || vendor_id == 0x1022); + const bool isAdreno = (vendor_id == 0x4D4F4351); m_features.texture_barrier = GSConfig.OverrideTextureBarriers != 0; m_features.multidraw_fb_copy = false; @@ -1580,6 +1581,7 @@ bool GSDevice12::CheckFeatures(const u32& vendor_id) { Console.WriteLnFmt("D3D12: Enhanced Barriers: {}", device_options12.EnhancedBarriersSupported ? "Supported" : "Not Supported"); m_enhanced_barriers = device_options12.EnhancedBarriersSupported; + m_rp_reorders_barriers = isAdreno; } else { @@ -4395,6 +4397,9 @@ void GSDevice12::FeedbackBarrier(const GSTexture12* texture) { if (m_enhanced_barriers) { + if (m_rp_reorders_barriers) + EndRenderPass(); + // Enhanced barriers allows for single resource feedback. const D3D12_BARRIER_SYNC sync = D3D12_BARRIER_SYNC_RENDER_TARGET | D3D12_BARRIER_SYNC_PIXEL_SHADING; const D3D12_BARRIER_ACCESS access = D3D12_BARRIER_ACCESS_RENDER_TARGET | D3D12_BARRIER_ACCESS_SHADER_RESOURCE; diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.h b/pcsx2/GS/Renderers/DX12/GSDevice12.h index 98f6eb05a2..8675afd3d9 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.h +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.h @@ -388,6 +388,10 @@ private: bool m_enhanced_barriers = false; bool m_device_lost = false; + // Drivers are allowed to move barriers to the start of a renderpass. + // Only Adreno drivers are known to do this. + bool m_rp_reorders_barriers = false; + ComPtr m_tfx_root_signature; ComPtr m_utility_root_signature;