Skip to content

Commit 0d1c9c3

Browse files
committed
Remove the D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE flag on replay
* This flag is purely an optimisation, it's never invalid to remove it.
1 parent ba67c32 commit 0d1c9c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

renderdoc/driver/d3d12/d3d12_device_wrap.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,9 @@ bool WrappedID3D12Device::Serialise_CreateCommittedResource(
969969
}
970970
}
971971

972+
// always allow SRVs on replay so we can inspect resources
973+
desc.Flags &= ~D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;
974+
972975
if(desc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
973976
{
974977
GPUAddressRange range;
@@ -1171,6 +1174,9 @@ bool WrappedID3D12Device::Serialise_CreatePlacedResource(
11711174
m_GPUAddresses.AddTo(range);
11721175
}
11731176

1177+
// always allow SRVs on replay so we can inspect resources
1178+
desc.Flags &= ~D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;
1179+
11741180
ID3D12Resource *ret = NULL;
11751181
HRESULT hr = m_pDevice->CreatePlacedResource(Unwrap(pHeap), Offset, &desc, state,
11761182
pOptimizedClearValue, guid, (void **)&ret);

0 commit comments

Comments
 (0)