the flags in vk_domain_from_heap() are the MINIMUM required flags for
the heap, but there may be other flags present, so ensure those are picked
up as expected
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17093>
bo->base.alignment_log2 = util_logbase2(alignment);
bo->base.size = mai.allocationSize;
bo->base.vtbl = &bo_vtbl;
- bo->base.placement = vk_domain_from_heap(heap);
+ bo->base.placement = screen->heap_flags[heap];
bo->base.usage = flags;
bo->unique_id = p_atomic_inc_return(&screen->pb.next_bo_unique_id);
else
screen->heap_map[i] = screen->heap_map[ZINK_HEAP_DEVICE_LOCAL];
}
+ screen->heap_flags[i] = screen->info.mem_props.memoryTypes[screen->heap_map[i]].propertyFlags;
}
{
unsigned vis_vram = screen->heap_map[ZINK_HEAP_DEVICE_LOCAL_VISIBLE];
uint32_t next_bo_unique_id;
} pb;
uint8_t heap_map[VK_MAX_MEMORY_TYPES];
+ VkMemoryPropertyFlags heap_flags[VK_MAX_MEMORY_TYPES];
bool resizable_bar;
uint64_t total_video_mem;