From a7f9ac2d7451000e41df27c6d182619e090bfcda Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 2 Mar 2024 09:21:09 +0100 Subject: [PATCH] release swapchain image when done submitting commands --- client/render/imgui_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index b4c499a1..53e63a22 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -458,7 +458,6 @@ void imgui_context::new_frame(XrTime display_time) XrCompositionLayerQuad imgui_context::end_frame() { vk::Image destination = swapchain.images()[image_index].image; - swapchain.release(); ImGui::SetCurrentContext(context); ImPlot::SetCurrentContext(plot_context); @@ -500,6 +499,8 @@ XrCompositionLayerQuad imgui_context::end_frame() .pCommandBuffers = &*cb, }, *fence); + swapchain.release(); + return XrCompositionLayerQuad{ .type = XR_TYPE_COMPOSITION_LAYER_QUAD, .layerFlags = XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT,