zink: set PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY for device-local resources

these can't be mapped, so ensure tc doesn't try to pass UNSYNCHRONIZED
maps and break the resources

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17187>
This commit is contained in:
Mike Blumenkrantz 2022-06-22 09:35:18 -04:00 committed by Marge Bot
parent 75724fe119
commit 4cb3043b53

View file

@ -1141,6 +1141,8 @@ resource_create(struct pipe_screen *pscreen,
res->optimal_tiling = true;
res->swapchain = true;
}
if (!res->obj->host_visible)
res->base.b.flags |= PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY;
if (res->obj->is_buffer) {
res->base.buffer_id_unique = util_idalloc_mt_alloc(&screen->buffer_ids);
_mesa_hash_table_init(&res->bufferview_cache, NULL, NULL, equals_bvci);