Don't call GetGPUVirtualAddress for non-buffer resources

This commit is contained in:
baldurk
2018-11-28 21:39:19 +00:00
parent 31deed61c5
commit 262a8fab9e
+2 -1
View File
@@ -1434,7 +1434,8 @@ bool WrappedID3D12Device::Serialise_CreatePlacedResource(
SERIALISE_ELEMENT_LOCAL(pResource, ((WrappedID3D12Resource *)*ppvResource)->GetResourceID())
.TypedAs("ID3D12Resource *");
SERIALISE_ELEMENT_LOCAL(gpuAddress, ((WrappedID3D12Resource *)*ppvResource)->GetGPUVirtualAddress())
SERIALISE_ELEMENT_LOCAL(gpuAddress,
((WrappedID3D12Resource *)*ppvResource)->GetGPUVirtualAddressIfBuffer())
.Hidden();
SERIALISE_CHECK_READ_ERRORS();