mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 13:30:44 +00:00
Extend D3D12 barrier special case code in FillWithDiscardPattern
Change educated guess for D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS resources
This commit is contained in:
@@ -1680,6 +1680,10 @@ void D3D12DebugManager::FillWithDiscardPattern(ID3D12GraphicsCommandListX *cmd,
|
||||
|
||||
b.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
|
||||
|
||||
// Special case for D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS
|
||||
if(desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS)
|
||||
b.Transition.StateBefore = D3D12_RESOURCE_STATE_COMMON;
|
||||
|
||||
D3D12_TEXTURE_BARRIER tex = {};
|
||||
D3D12_BARRIER_GROUP group = {};
|
||||
|
||||
@@ -1695,6 +1699,10 @@ void D3D12DebugManager::FillWithDiscardPattern(ID3D12GraphicsCommandListX *cmd,
|
||||
tex.AccessAfter = D3D12_BARRIER_ACCESS_COPY_DEST;
|
||||
tex.SyncAfter = D3D12_BARRIER_SYNC_COPY;
|
||||
|
||||
// Special case for D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS
|
||||
if(desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS)
|
||||
tex.LayoutAfter = D3D12_BARRIER_LAYOUT_COMMON;
|
||||
|
||||
tex.Flags = D3D12_TEXTURE_BARRIER_FLAG_DISCARD;
|
||||
tex.Subresources.IndexOrFirstMipLevel = (UINT)sub;
|
||||
tex.pResource = res;
|
||||
@@ -1792,6 +1800,10 @@ void D3D12DebugManager::FillWithDiscardPattern(ID3D12GraphicsCommandListX *cmd,
|
||||
tex.LayoutAfter = D3D12_BARRIER_LAYOUT_COMMON;
|
||||
}
|
||||
|
||||
// Special case for D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS
|
||||
if(desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS)
|
||||
tex.LayoutBefore = D3D12_BARRIER_LAYOUT_COMMON;
|
||||
|
||||
cmd->Barrier(1, &group);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user