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 3c562cfc06)
This commit is contained in:
Mike Blumenkrantz 2023-01-25 11:19:07 -05:00 committed by Dylan Baker
parent 6d973fed48
commit 364a15c352
2 changed files with 3 additions and 1 deletions

View file

@ -517,7 +517,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
},

View file

@ -684,6 +684,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];