Fix initial state creation for CPU upload heaps on D3D12

This commit is contained in:
baldurk
2025-11-10 17:03:52 +00:00
parent eee1268a9f
commit d00c563e89
+1 -1
View File
@@ -1749,7 +1749,7 @@ void D3D12ResourceManager::Create_InitialState(ResourceId id, ID3D12DeviceChild
// if destination is on the upload heap, it's impossible to copy via the device,
// so we have to CPU copy. To save time and make a more optimal copy, we just keep the data
// CPU-side
D3D12InitialContents initContents(D3D12InitialContents::Copy, Resource_Resource);
D3D12InitialContents initContents(D3D12InitialContents::Copy, type);
uint64_t size = RDCMAX(resDesc.Width, 64ULL);
initContents.srcData = AllocAlignedBuffer(size);
memset(initContents.srcData, 0, (size_t)size);