Skip to content

Commit

Permalink
fix: gpu allocator issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan hoffstadt committed Jan 28, 2025
1 parent 0328ddc commit 3145314
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/pl_gpu_allocators_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ pl_allocate_buddy(
{
plDeviceAllocatorData* ptData = (plDeviceAllocatorData*)ptInst;

if(ulAlignment > 0)
if(ulAlignment > 0 && ulSize < PL_DEVICE_BUDDY_BLOCK_SIZE)
ulSize = ulSize + (ulAlignment - 1);

const uint32_t uLevel = pl__get_buddy_level(ulSize);
Expand Down Expand Up @@ -628,7 +628,7 @@ pl_allocate_staging_uncached_buddy(
{
plDeviceAllocatorData* ptData = (plDeviceAllocatorData*)ptInst;

if(ulAlignment > 0)
if(ulAlignment > 0 && ulSize < PL_DEVICE_BUDDY_BLOCK_SIZE)
ulSize = ulSize + (ulAlignment - 1);

const uint32_t uLevel = pl__get_buddy_level(ulSize);
Expand Down

0 comments on commit 3145314

Please sign in to comment.