summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-06-22 09:35:18 -0400
committerMarge Bot <emma+marge@anholt.net>2022-06-29 04:40:07 +0000
commit4cb3043b535992fa00e2be7db846e70790f0e863 (patch)
treed9b76177e57609861d8db931a9a752c580e7dea8
parent75724fe1190582eabfb10ae7d451a2a72938a721 (diff)
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>
-rw-r--r--src/gallium/drivers/zink/zink_resource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 0bedd2cf194..092a2487ff5 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -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);