mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-12 02:08:45 +00:00
GS/DX12: Workaround Adreno moving barriers to render passes start
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<ID3D12RootSignature> m_tfx_root_signature;
|
||||
ComPtr<ID3D12RootSignature> m_utility_root_signature;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user