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:
baldurk
2017-08-02 21:04:51 +01:00
parent ba67c3214b
commit 0d1c9c39fe
@@ -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);