mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-09 14:10:07 +00:00
Fix in BlockMetadata_Linear::CreateAllocationRequest for too large allocations
Ported from https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/pull/396
This commit is contained in:
parent
5b87b9a028
commit
c29f274ea1
@ -4034,6 +4034,10 @@ bool BlockMetadata_Linear::CreateAllocationRequest(
|
||||
D3D12MA_ASSERT(allocSize > 0 && "Cannot allocate empty block!");
|
||||
D3D12MA_ASSERT(pAllocationRequest != NULL);
|
||||
D3D12MA_HEAVY_ASSERT(Validate());
|
||||
|
||||
if(allocSize > GetSize())
|
||||
return false;
|
||||
|
||||
pAllocationRequest->size = allocSize;
|
||||
return upperAddress ?
|
||||
CreateAllocationRequest_UpperAddress(
|
||||
|
Loading…
Reference in New Issue
Block a user