mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
anv: Export anv_bo_is_small_heap()
This function will be needs in two places in the next patches. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33558>
This commit is contained in:
parent
ce4d48107c
commit
4e7ba17413
2 changed files with 9 additions and 5 deletions
|
|
@ -1509,11 +1509,7 @@ anv_bo_vma_alloc_or_close(struct anv_device *device,
|
|||
assert(bo->vma_heap == NULL);
|
||||
assert(explicit_address == intel_48b_address(explicit_address));
|
||||
|
||||
const bool is_small_heap =
|
||||
alloc_flags & (ANV_BO_ALLOC_DESCRIPTOR_POOL |
|
||||
ANV_BO_ALLOC_DYNAMIC_VISIBLE_POOL |
|
||||
ANV_BO_ALLOC_32BIT_ADDRESS);
|
||||
|
||||
const bool is_small_heap = anv_bo_is_small_heap(alloc_flags);
|
||||
uint32_t align = device->physical->info.mem_alignment;
|
||||
|
||||
/* If it's big enough to store a tiled resource, we need 64K alignment */
|
||||
|
|
|
|||
|
|
@ -2396,6 +2396,14 @@ void anv_vma_free(struct anv_device *device,
|
|||
struct util_vma_heap *vma_heap,
|
||||
uint64_t address, uint64_t size);
|
||||
|
||||
static inline bool
|
||||
anv_bo_is_small_heap(enum anv_bo_alloc_flags alloc_flags)
|
||||
{
|
||||
return alloc_flags & (ANV_BO_ALLOC_DESCRIPTOR_POOL |
|
||||
ANV_BO_ALLOC_DYNAMIC_VISIBLE_POOL |
|
||||
ANV_BO_ALLOC_32BIT_ADDRESS);
|
||||
}
|
||||
|
||||
struct anv_reloc_list {
|
||||
bool uses_relocs;
|
||||
uint32_t dep_words;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue