From 1998e216b61e29951e56f28d251c15b82c627824 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 25 Feb 2021 12:33:11 -0500 Subject: [PATCH] zink: track coherent resource objects Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_resource.c | 1 + src/gallium/drivers/zink/zink_resource.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 2ab39de6151..f50fa6ffe67 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -411,6 +411,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; } else obj->host_visible = true; + obj->coherent = flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; VkExportMemoryAllocateInfo emai = {}; if (templ->bind & PIPE_BIND_SHARED) { diff --git a/src/gallium/drivers/zink/zink_resource.h b/src/gallium/drivers/zink/zink_resource.h index 9e97dd3bacc..288f95315e9 100644 --- a/src/gallium/drivers/zink/zink_resource.h +++ b/src/gallium/drivers/zink/zink_resource.h @@ -77,6 +77,7 @@ struct zink_resource_object { void *map; bool is_buffer; bool host_visible; + bool coherent; }; struct zink_resource {