Lines Matching defs:alignment

113 /* Return the slab entry alignment. */
209 get_optimal_alignment(struct zink_screen *screen, uint64_t size, unsigned alignment)
211 /* Increase the alignment for faster address translation and better memory
215 alignment = MAX2(alignment, 4096);
219 alignment = MAX2(alignment, 1u << (msb - 1));
221 return alignment;
248 unsigned alignment,
260 alignment = get_optimal_alignment(screen, size, alignment);
268 alignment = MAX2(alignment, screen->info.props.limits.minMemoryMapAlignment);
305 bo->base.alignment_log2 = util_logbase2(alignment);
553 zink_bo_create(struct zink_screen *screen, uint64_t size, unsigned alignment, enum zink_heap heap, enum zink_alloc_flag flags, const void *pNext)
579 if (size < alignment && alignment <= 4 * 1024)
580 alloc_size = alignment;
582 if (alignment > get_slab_entry_alignment(screen, alloc_size)) {
583 /* 3/4 allocations can return too small alignment. Try again with a power of two
588 if (alignment <= pot_size) {
589 /* This size works but wastes some memory to fulfil the alignment. */
592 goto no_slab; /* can't fulfil alignment requirements */
618 assert(alignment <= 1 << bo->base.alignment_log2);
625 assert(ZINK_SPARSE_BUFFER_PAGE_SIZE % alignment == 0);
630 /* Align size to page size. This is the minimum alignment for normal
636 alignment = align(alignment, screen->info.props.limits.minMemoryMapAlignment);
644 pb_cache_reclaim_buffer(&screen->pb.bo_cache, size, alignment, 0, heap);
650 bo = bo_create_internal(screen, size, alignment, heap, flags, pNext);
655 bo = bo_create_internal(screen, size, alignment, heap, flags, pNext);
1249 /* Wasted alignment due to slabs with 3/4 allocations being aligned to a power of two. */