From 2105b352d6be1657957510e4eedf7e5f4ecbbda4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 25 Jan 2023 11:19:07 -0500 Subject: [PATCH] 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: (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 d940d20..9825a27 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4603,7 +4603,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 372c470..84fed5c 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]; -- 2.7.4