Skip swapchain logic if there is nothing to present (Android OpenXR)
This commit is contained in:
parent
c8c483cf57
commit
d6caa69e11
13 changed files with 36 additions and 26 deletions
|
|
@ -2395,9 +2395,11 @@ void VulkanContext::append_command_buffer(RDD::CommandBufferID p_command_buffer)
|
|||
command_buffer_count++;
|
||||
}
|
||||
|
||||
void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending) {
|
||||
void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending, bool p_sync) {
|
||||
// Ensure everything else pending is executed.
|
||||
vkDeviceWaitIdle(device);
|
||||
if (p_sync) {
|
||||
vkDeviceWaitIdle(device);
|
||||
}
|
||||
|
||||
// Flush the pending setup buffer.
|
||||
|
||||
|
|
@ -2440,7 +2442,9 @@ void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending) {
|
|||
ERR_FAIL_COND(err);
|
||||
}
|
||||
|
||||
vkDeviceWaitIdle(device);
|
||||
if (p_sync) {
|
||||
vkDeviceWaitIdle(device);
|
||||
}
|
||||
}
|
||||
|
||||
Error VulkanContext::prepare_buffers(RDD::CommandBufferID p_command_buffer) {
|
||||
|
|
@ -2504,7 +2508,7 @@ Error VulkanContext::swap_buffers() {
|
|||
return OK;
|
||||
}
|
||||
|
||||
// print_line("swapbuffers?");
|
||||
//print_line("swap_buffers");
|
||||
VkResult err;
|
||||
|
||||
#if 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue