release swapchain image when done submitting commands

This commit is contained in:
Patrick Nicolas
2024-03-04 16:09:40 +01:00
parent aa194a1213
commit a7f9ac2d74
+2 -1
View File
@@ -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,