diff options
Diffstat (limited to 'src/vulkan/graphics_pipeline.cc')
-rw-r--r-- | src/vulkan/graphics_pipeline.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vulkan/graphics_pipeline.cc b/src/vulkan/graphics_pipeline.cc index e9d5c61..705ca37 100644 --- a/src/vulkan/graphics_pipeline.cc +++ b/src/vulkan/graphics_pipeline.cc @@ -819,7 +819,12 @@ Result GraphicsPipeline::ClearBuffer(const VkClearValue& clear_value, if (!r.IsSuccess()) return r; - return cmd_buf_guard.Submit(GetFenceTimeout()); + r = cmd_buf_guard.Submit(GetFenceTimeout()); + if (!r.IsSuccess()) + return r; + + frame_->CopyImagesToBuffers(); + return {}; } Result GraphicsPipeline::Draw(const DrawArraysCommand* command, @@ -917,6 +922,8 @@ Result GraphicsPipeline::Draw(const DrawArraysCommand* command, if (!r.IsSuccess()) return r; + frame_->CopyImagesToBuffers(); + device_->GetPtrs()->vkDestroyPipeline(device_->GetVkDevice(), pipeline, nullptr); device_->GetPtrs()->vkDestroyPipelineLayout(device_->GetVkDevice(), |