Module: Mesa
Branch: main
Commit: 2a63f38cb12d6d3a90a2a8638a97699f693af779
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a63f38cb12d6d3a90a2a8638a97699f693af779

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Sep  9 20:48:38 2021 -0400

zink: set a flag for dmabuf init

this will be useful for barrier handling

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>

---

 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 46f6d9dc1cc..8bf78be0d2e 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -748,6 +748,7 @@ resource_create(struct pipe_screen *pscreen,
       }
    } else {
       res->format = zink_get_format(screen, templ->format);
+      res->dmabuf_acquire = whandle && whandle->type == WINSYS_HANDLE_TYPE_FD;
       res->layout = VK_IMAGE_LAYOUT_UNDEFINED;
       res->optimal_tiling = optimal_tiling;
       res->aspect = aspect_from_format(templ->format);
diff --git a/src/gallium/drivers/zink/zink_resource.h 
b/src/gallium/drivers/zink/zink_resource.h
index 6a51f7c63a8..9a5ddf2aa09 100644
--- a/src/gallium/drivers/zink/zink_resource.h
+++ b/src/gallium/drivers/zink/zink_resource.h
@@ -122,6 +122,7 @@ struct zink_resource {
       uint32_t all_binds;
    };
 
+   bool dmabuf_acquire;
    struct sw_displaytarget *dt;
    unsigned dt_stride;
 

Reply via email to