zink: avoid caching visible vram allocations
the visible vram heap is potentially going to be limited in size, so avoid caching these allocations since that locks them to a given allocation size Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11397>
This commit is contained in:
parent
18b71c0da3
commit
c56a100494
|
@ -537,7 +537,9 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
mai.pNext = &memory_wsi_info;
|
||||
}
|
||||
|
||||
if (!mai.pNext && !(templ->flags & (PIPE_RESOURCE_FLAG_MAP_COHERENT | PIPE_RESOURCE_FLAG_SPARSE))) {
|
||||
/* don't cache visible vram because it's more likely to be limited */
|
||||
VkMemoryPropertyFlags visible_vram = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
if (!mai.pNext && !(templ->flags & (PIPE_RESOURCE_FLAG_MAP_COHERENT | PIPE_RESOURCE_FLAG_SPARSE)) && ((flags & visible_vram) != visible_vram)) {
|
||||
obj->mkey.reqs = reqs;
|
||||
obj->mkey.flags = flags;
|
||||
obj->mem_hash = mem_hash(&obj->mkey);
|
||||
|
|
Loading…
Reference in New Issue