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>
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,
};
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