mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 14:15:42 +00:00
Remove the D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE flag on replay
* This flag is purely an optimisation, it's never invalid to remove it.
This commit is contained in:
@@ -969,6 +969,9 @@ bool WrappedID3D12Device::Serialise_CreateCommittedResource(
|
||||
}
|
||||
}
|
||||
|
||||
// always allow SRVs on replay so we can inspect resources
|
||||
desc.Flags &= ~D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;
|
||||
|
||||
if(desc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
|
||||
{
|
||||
GPUAddressRange range;
|
||||
@@ -1171,6 +1174,9 @@ bool WrappedID3D12Device::Serialise_CreatePlacedResource(
|
||||
m_GPUAddresses.AddTo(range);
|
||||
}
|
||||
|
||||
// always allow SRVs on replay so we can inspect resources
|
||||
desc.Flags &= ~D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;
|
||||
|
||||
ID3D12Resource *ret = NULL;
|
||||
HRESULT hr = m_pDevice->CreatePlacedResource(Unwrap(pHeap), Offset, &desc, state,
|
||||
pOptimizedClearValue, guid, (void **)&ret);
|
||||
|
||||
Reference in New Issue
Block a user