Refuse to read contents of AS buffers on D3D12

This commit is contained in:
baldurk
2024-11-08 10:49:05 +00:00
parent c427a3f85f
commit 90411d50ed
+4
View File
@@ -2154,6 +2154,10 @@ void D3D12DebugManager::GetBufferData(ID3D12Resource *buffer, uint64_t offset, u
ret.resize((size_t)length);
WrappedID3D12Resource *wrapped = (WrappedID3D12Resource *)buffer;
if(wrapped->IsAccelerationStructureResource())
return;
// directly CPU mappable (and possibly invalid to transition and copy from), so just memcpy
if(heapProps.Type == D3D12_HEAP_TYPE_UPLOAD || heapProps.Type == D3D12_HEAP_TYPE_READBACK)
{