From ec6d6365cb751e30ece11115c67cb5f71daa0b9b Mon Sep 17 00:00:00 2001 From: Gary Sweet <20819159+gary-sweet@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:50:23 +0000 Subject: [PATCH] Fix validation errors in timeline_semaphores sample (#927) * Fix validation errors in timeline_semaphores sample The command buffer was being implicitly reset, but wasn't resettable. * Review feedback addressed Used a much simpler approach to resolve the error --- samples/extensions/timeline_semaphore/timeline_semaphore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/extensions/timeline_semaphore/timeline_semaphore.cpp b/samples/extensions/timeline_semaphore/timeline_semaphore.cpp index 66fb4f6d2..4b9c69409 100644 --- a/samples/extensions/timeline_semaphore/timeline_semaphore.cpp +++ b/samples/extensions/timeline_semaphore/timeline_semaphore.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2021-2023, Arm Limited and Contributors +/* Copyright (c) 2021-2024, Arm Limited and Contributors * * SPDX-License-Identifier: Apache-2.0 * @@ -643,6 +643,7 @@ void TimelineSemaphore::render(float delta_time) viewport.height = viewport.width; } + recreate_current_command_buffer(); auto cmd = draw_cmd_buffers[current_buffer]; auto begin_info = vkb::initializers::command_buffer_begin_info(); begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;