From: Mikko Rasa Date: Mon, 21 Mar 2022 21:31:05 +0000 (+0200) Subject: Fix issues from the command recorder refactoring X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d90a2925adf08409aafbacec94abaffa0da643e6;p=libs%2Fgl.git Fix issues from the command recorder refactoring --- diff --git a/source/backends/vulkan/commands_backend.cpp b/source/backends/vulkan/commands_backend.cpp index fd95d152..777d1a6b 100644 --- a/source/backends/vulkan/commands_backend.cpp +++ b/source/backends/vulkan/commands_backend.cpp @@ -149,7 +149,7 @@ void VulkanCommands::begin_render_pass(bool clear, const ClearValue *clear_value void VulkanCommands::end_render_pass() { const VulkanFunctions &vk = device.get_functions(); - VulkanCommandRecorder vkCmd(vk, pass_buffer); + VulkanCommandRecorder vkCmd(vk, primary_buffer); vk.EndCommandBuffer(pass_buffer); @@ -253,12 +253,11 @@ void VulkanCommands::draw_instanced(const Batch &batch, unsigned count) if(!pipeline_state) throw invalid_operation("VulkanCommands::draw_instanced"); - const VulkanFunctions &vk = device.get_functions(); - VulkanCommandRecorder vkCmd(vk, pass_buffer); - if(!framebuffer) begin_render_pass(false, 0); + VulkanCommandRecorder vkCmd(device.get_functions(), pass_buffer); + pipeline_state->refresh(); pipeline_state->apply(vkCmd, last_pipeline, frame_index, fb_is_swapchain); last_pipeline = pipeline_state;