vulkan: pass cmdbuf level to vk_command_buffer_ops::create()

RADV needs to know the command buffer level in the create() helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28861>
This commit is contained in:
Samuel Pitoiset
2024-04-22 17:29:17 +02:00
committed by Marge Bot
parent 1fb9e67f7e
commit e4f945cd4a
10 changed files with 22 additions and 17 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ struct vk_command_buffer_ops {
* set by `vk_common_AllocateCommandBuffers()` and the driver must not rely
* on it until `vkBeginCommandBuffer()` time.
*/
VkResult (*create)(struct vk_command_pool *,
VkResult (*create)(struct vk_command_pool *, VkCommandBufferLevel,
struct vk_command_buffer **);
/** Resets the command buffer
+1 -1
View File
@@ -203,7 +203,7 @@ vk_common_AllocateCommandBuffers(VkDevice device,
for (i = 0; i < pAllocateInfo->commandBufferCount; i++) {
struct vk_command_buffer *cmd_buffer = vk_command_pool_find_free(pool);
if (cmd_buffer == NULL) {
result = pool->command_buffer_ops->create(pool, &cmd_buffer);
result = pool->command_buffer_ops->create(pool, pAllocateInfo->level, &cmd_buffer);
if (unlikely(result != VK_SUCCESS))
goto fail;
}