vulkan: Add a common vkResetCommandBuffer() implementation
This is little more than a wrapper around a function pointer at present so it doesn't really gain the driver much to use it. The new callback will, however, be put to good use in the next commit. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18324>
This commit is contained in:
committed by
Marge Bot
parent
44ab076fea
commit
f2288cca47
@@ -72,6 +72,17 @@ vk_command_buffer_finish(struct vk_command_buffer *command_buffer)
|
||||
vk_object_base_finish(&command_buffer->base);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
vk_common_ResetCommandBuffer(VkCommandBuffer commandBuffer,
|
||||
VkCommandBufferResetFlags flags)
|
||||
{
|
||||
VK_FROM_HANDLE(vk_command_buffer, cmd_buffer, commandBuffer);
|
||||
|
||||
cmd_buffer->ops->reset(cmd_buffer, flags);
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vk_common_CmdExecuteCommands(VkCommandBuffer commandBuffer,
|
||||
uint32_t commandBufferCount,
|
||||
|
||||
@@ -60,6 +60,15 @@ struct vk_attachment_state {
|
||||
};
|
||||
|
||||
struct vk_command_buffer_ops {
|
||||
/** Resets the command buffer
|
||||
*
|
||||
* Used by the common command pool implementation. This function MUST
|
||||
* call `vk_command_buffer_reset()`. Unlike `vkResetCommandBuffer()`,
|
||||
* this function does not have a return value because it may be called on
|
||||
* destruction paths.
|
||||
*/
|
||||
void (*reset)(struct vk_command_buffer *, VkCommandBufferResetFlags);
|
||||
|
||||
/** Destroys the command buffer
|
||||
*
|
||||
* Used by the common command pool implementation. This function MUST
|
||||
|
||||
Reference in New Issue
Block a user