Lines Matching refs:ma
497 * ANV_MULTIALLOC(ma)
498 * anv_multialloc_add(&ma, &main_ptr, 1);
499 * anv_multialloc_add(&ma, &substruct1, substruct1Count);
500 * anv_multialloc_add(&ma, &substruct2, substruct2Count);
502 * if (!anv_multialloc_alloc(&ma, pAllocator, VK_ALLOCATION_SCOPE_FOO))
521 _anv_multialloc_add(struct anv_multialloc *ma,
524 size_t offset = align_u64(ma->size, align);
525 ma->size = offset + size;
526 ma->align = MAX2(ma->align, align);
531 assert(ma->ptr_count < ARRAY_SIZE(ma->ptrs));
532 ma->ptrs[ma->ptr_count++] = ptr;
543 anv_multialloc_alloc(struct anv_multialloc *ma,
547 void *ptr = vk_alloc(alloc, ma->size, ma->align, scope);
553 * for (uint32_t i = 0; i < ma->ptr_count; i++)
554 * *ma->ptrs[i] = ptr + (uintptr_t)*ma->ptrs[i];
556 * Unfortunately, even though ma->ptr_count is basically guaranteed to be a
560 STATIC_ASSERT(ARRAY_SIZE(ma->ptrs) == 8);
562 if ((_i) < ma->ptr_count) \
563 *ma->ptrs[_i] = ptr + (uintptr_t)*ma->ptrs[_i]
579 anv_multialloc_alloc2(struct anv_multialloc *ma,
584 return anv_multialloc_alloc(ma, alloc ? alloc : parent_alloc, scope);