zink: emulate some more memory

If ZINK_HEAP_DEVICE_LOCAL_VISIBLE isn't available natively, then
fallback to device local memory without asserting.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15202>
This commit is contained in:
Gurchetan Singh 2022-02-28 17:59:04 -08:00 committed by Marge Bot
parent 9e9a366cad
commit 83de19c900
1 changed files with 2 additions and 1 deletions

View File

@ -2235,7 +2235,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
/* not found: use compatible heap */
if (screen->heap_map[i] == UINT8_MAX) {
/* only cached mem has a failure case for now */
assert(i == ZINK_HEAP_HOST_VISIBLE_CACHED || i == ZINK_HEAP_DEVICE_LOCAL_LAZY);
assert(i == ZINK_HEAP_HOST_VISIBLE_CACHED || i == ZINK_HEAP_DEVICE_LOCAL_LAZY ||
i == ZINK_HEAP_DEVICE_LOCAL_VISIBLE);
if (i == ZINK_HEAP_HOST_VISIBLE_CACHED)
screen->heap_map[i] = screen->heap_map[ZINK_HEAP_HOST_VISIBLE_COHERENT];
else