summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2021-02-25 12:33:11 -0500
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2021-03-30 17:11:43 -0400
commit1998e216b61e29951e56f28d251c15b82c627824 (patch)
treef2d779ad646a2d0b56ec74c1477c64fb5adc79fe
parent4daef7ffe373f067249e052d96dcac145984b6e8 (diff)
zink: track coherent resource objects
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9884>
-rw-r--r--src/gallium/drivers/zink/zink_resource.c1
-rw-r--r--src/gallium/drivers/zink/zink_resource.h1
2 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 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 {