Skip to content

Commit

Permalink
[WA] Use 64KB alignment instead of 2MB alignment
Browse files Browse the repository at this point in the history
Chimo app allocate descriptor pool so frequently, with 2MB alignment
the 2Gb descriptor pool heap vm address space is used up quickly.
  • Loading branch information
ShenghuaLinINTEL committed Sep 25, 2024
1 parent 1588bfe commit 955c355
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/intel/vulkan/anv_allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,8 @@ anv_bo_vma_alloc_or_close(struct anv_device *device,
assert(bo->vma_heap == NULL);
assert(explicit_address == intel_48b_address(explicit_address));

uint32_t align = device->physical->info.mem_alignment;
uint32_t align = (alloc_flags & (ANV_BO_ALLOC_DESCRIPTOR_POOL | ANV_BO_ALLOC_SAMPLER_POOL))
? 64 * 1024 : device->physical->info.mem_alignment;

/* If it's big enough to store a tiled resource, we need 64K alignment */
if (bo->size >= 64 * 1024)
Expand Down

0 comments on commit 955c355

Please sign in to comment.