mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
zink: cache visible vram
yolo Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11594>
This commit is contained in:
parent
d4a7b4fef8
commit
9d599ed417
1 changed files with 1 additions and 3 deletions
|
|
@ -533,9 +533,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
mai.pNext = &memory_wsi_info;
|
||||
}
|
||||
|
||||
/* 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)) && ((mem_type.propertyFlags & visible_vram) != visible_vram)) {
|
||||
if (!mai.pNext && !(templ->flags & (PIPE_RESOURCE_FLAG_MAP_COHERENT | PIPE_RESOURCE_FLAG_SPARSE))) {
|
||||
obj->mkey.key.reqs = reqs;
|
||||
obj->mkey.key.heap_index = mai.memoryTypeIndex;
|
||||
obj->mem_hash = mem_hash(&obj->mkey);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue