Mesa (master): zink: track coherent resource objects

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 30 21:37:20 UTC 2021


Module: Mesa
Branch: master
Commit: 1998e216b61e29951e56f28d251c15b82c627824
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1998e216b61e29951e56f28d251c15b82c627824

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Feb 25 12:33:11 2021 -0500

zink: track coherent resource objects

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9884>

---

 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 {



More information about the mesa-commit mailing list