zink: be a little selective about BAR fallback memory type
some resources MUST be host-visible, so use the appropriate heap for them cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17093>
This commit is contained in:
committed by
Marge Bot
parent
5750050432
commit
be4f120476
@@ -961,7 +961,10 @@ retry:
|
||||
obj->bo = zink_bo(zink_bo_create(screen, reqs.size, alignment, heap, mai.pNext ? ZINK_ALLOC_NO_SUBALLOC : 0, mai.pNext));
|
||||
if (!obj->bo) {
|
||||
if (heap == ZINK_HEAP_DEVICE_LOCAL_VISIBLE) {
|
||||
heap = ZINK_HEAP_DEVICE_LOCAL;
|
||||
if (templ->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT || templ->usage == PIPE_USAGE_DYNAMIC)
|
||||
heap = ZINK_HEAP_HOST_VISIBLE_COHERENT;
|
||||
else
|
||||
heap = ZINK_HEAP_DEVICE_LOCAL;
|
||||
goto retry;
|
||||
}
|
||||
goto fail2;
|
||||
|
||||
Reference in New Issue
Block a user