mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
zink: allocate all batch command buffers in one call
just simpler Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246>
This commit is contained in:
parent
295dd6f515
commit
e8b8279b61
1 changed files with 5 additions and 8 deletions
|
|
@ -292,23 +292,20 @@ create_batch_state(struct zink_context *ctx)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
VkCommandBuffer cmdbufs[2];
|
||||
VkCommandBufferAllocateInfo cbai = {0};
|
||||
cbai.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
|
||||
cbai.commandPool = bs->cmdpool;
|
||||
cbai.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
||||
cbai.commandBufferCount = 1;
|
||||
cbai.commandBufferCount = 2;
|
||||
|
||||
result = VKSCR(AllocateCommandBuffers)(screen->dev, &cbai, &bs->cmdbuf);
|
||||
if (result != VK_SUCCESS) {
|
||||
mesa_loge("ZINK: vkAllocateCommandBuffers failed (%s)", vk_Result_to_str(result));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
result = VKSCR(AllocateCommandBuffers)(screen->dev, &cbai, &bs->barrier_cmdbuf);
|
||||
result = VKSCR(AllocateCommandBuffers)(screen->dev, &cbai, cmdbufs);
|
||||
if (result != VK_SUCCESS) {
|
||||
mesa_loge("ZINK: vkAllocateCommandBuffers failed (%s)", vk_Result_to_str(result));
|
||||
goto fail;
|
||||
}
|
||||
bs->cmdbuf = cmdbufs[0];
|
||||
bs->barrier_cmdbuf = cmdbufs[1];
|
||||
|
||||
#define SET_CREATE_OR_FAIL(ptr) \
|
||||
if (!_mesa_set_init(ptr, bs, _mesa_hash_pointer, _mesa_key_pointer_equal)) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue