Module: Mesa
Branch: staging/22.3
Commit: 72e01f997e043e30ca90f22331e7423b82196448
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=72e01f997e043e30ca90f22331e7423b82196448

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Jan 25 11:19:07 2023 -0500

zink: set vkusage/vkflags for buffer resource objects

this needs to be populated for other places in the driver that need it

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20912>
(cherry picked from commit 3c562cfc06417ca52738460bbe63ad972f26f4c5)

---

 .pick_status.json                        | 2 +-
 src/gallium/drivers/zink/zink_resource.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 6b8e3594aa5..8a8b8f5dd3c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -130,7 +130,7 @@
         "description": "zink: set vkusage/vkflags for buffer resource objects",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_resource.c 
b/src/gallium/drivers/zink/zink_resource.c
index 372c470fed8..84fed5c3482 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -675,6 +675,8 @@ resource_object_create(struct zink_screen *screen, const 
struct pipe_resource *t
          flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | 
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
       obj->is_buffer = true;
       obj->transfer_dst = true;
+      obj->vkflags = bci.flags;
+      obj->vkusage = bci.usage;
    } else {
       bool winsys_modifier = (export_types & 
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) && whandle && whandle->modifier 
!= DRM_FORMAT_MOD_INVALID;
       uint64_t mods[10];

Reply via email to