Skip swapchain logic if there is nothing to present (Android OpenXR)

This commit is contained in:
Bastiaan Olij
2023-10-31 21:56:23 +11:00
parent c8c483cf57
commit d6caa69e11
13 changed files with 36 additions and 26 deletions

View File

@@ -5467,9 +5467,13 @@ void RenderingDevice::swap_buffers() {
context->postpare_buffers(frames[frame].draw_command_buffer);
_finalize_command_bufers();
screen_prepared = false;
// Swap buffers.
context->swap_buffers();
if (!screen_prepared) {
context->flush(true, true, false);
} else {
screen_prepared = false;
context->swap_buffers();
}
frame = (frame + 1) % frame_count;