Module: Mesa Branch: main Commit: d13bf8f6b19f920447719cb300fe383ae6d632c0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d13bf8f6b19f920447719cb300fe383ae6d632c0
Author: Yiwei Zhang <[email protected]> Date: Mon Jul 10 16:31:48 2023 -0700 venus: fix cmd state leak across implicit reset Reset cmd states during vkBeginCommandBuffer regardless of the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT for simplicity. Cc: mesa-stable Signed-off-by: Yiwei Zhang <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103> --- src/virtio/vulkan/vn_command_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/virtio/vulkan/vn_command_buffer.c b/src/virtio/vulkan/vn_command_buffer.c index fefa8445256..1d9e28256c0 100644 --- a/src/virtio/vulkan/vn_command_buffer.c +++ b/src/virtio/vulkan/vn_command_buffer.c @@ -1015,8 +1015,8 @@ vn_BeginCommandBuffer(VkCommandBuffer commandBuffer, struct vn_instance *instance = cmd->pool->device->instance; size_t cmd_size; - vn_cs_encoder_reset(&cmd->cs); - cmd->draw_cmd_batched = 0; + /* reset regardless of VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT */ + vn_cmd_reset(cmd); struct vn_command_buffer_begin_info local_begin_info; pBeginInfo =
