Skip to content

Commit

Permalink
venus: add SHADER_DEVICE_ADDRESS_BIT to buffer cache
Browse files Browse the repository at this point in the history
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT is being set by zink.

Signed-off-by: Juston Li <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21177>
  • Loading branch information
juston-li authored and Marge Bot committed Feb 8, 2023
1 parent 4054b08 commit 3061ec3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/virtio/vulkan/vn_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static const VkBufferCreateInfo cache_infos[] = {
VK_BUFFER_USAGE_INDEX_BUFFER_BIT |
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT |
VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT |
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT |
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT |
VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT,
Expand Down Expand Up @@ -112,6 +113,9 @@ vn_buffer_cache_entries_create(struct vn_device *dev,
}
if (!app_exts->EXT_conditional_rendering)
local_info.usage &= ~VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT;
/* TODO check feature enablement instead */
if (!app_exts->KHR_buffer_device_address)
local_info.usage &= ~VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT;

result = vn_CreateBuffer(dev_handle, &local_info, alloc, &buf_handle);
if (result != VK_SUCCESS) {
Expand Down

0 comments on commit 3061ec3

Please sign in to comment.