zink: track coherent resource objects
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 25 Feb 2021 17:33:11 +0000 (12:33 -0500)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 30 Mar 2021 21:11:43 +0000 (17:11 -0400)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9884>

src/gallium/drivers/zink/zink_resource.c
src/gallium/drivers/zink/zink_resource.h

index 2ab39de..f50fa6f 100644 (file)
@@ -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) {
index 9e97dd3..288f953 100644 (file)
@@ -77,6 +77,7 @@ struct zink_resource_object {
    void *map;
    bool is_buffer;
    bool host_visible;
+   bool coherent;
 };
 
 struct zink_resource {