Fix GPU Buffer Map/Unmap pair to prevent stall if map fails on DX11

#942
This commit is contained in:
Wojtek Figat
2023-02-17 16:28:48 +01:00
parent 5dc63da4bf
commit 679757942f
7 changed files with 19 additions and 16 deletions

View File

@@ -377,12 +377,9 @@ void GPUBuffer::SetData(const void* data, uint32 size)
Log::ArgumentOutOfRangeException(TEXT("Buffer.SetData"));
return;
}
void* mapped = Map(GPUResourceMapMode::Write);
if (!mapped)
{
return;
}
Platform::MemoryCopy(mapped, data, size);
Unmap();
}