mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 10:48:05 +02:00
clients/simple-vulkan.c: eliminate dead code
I also moved vkQueuePresentKHR() out of the if-else block for better readability. Signed-off-by: Hiroaki Yamamoto <hrak1529@gmail.com>
This commit is contained in:
parent
6565ab7a5a
commit
bb9dab6634
1 changed files with 2 additions and 10 deletions
|
|
@ -1603,20 +1603,12 @@ redraw(struct window *window)
|
|||
.pRegions = ®ion,
|
||||
};
|
||||
pnext(&present_info, &present_regions);
|
||||
|
||||
result = vkQueuePresentKHR(window->vk.queue, &present_info);
|
||||
} else {
|
||||
result = vkQueuePresentKHR(window->vk.queue, &present_info);
|
||||
}
|
||||
|
||||
result = vkQueuePresentKHR(window->vk.queue, &present_info);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
return;
|
||||
if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR) {
|
||||
recreate_swapchain(window);
|
||||
return;
|
||||
} else if (result != VK_SUCCESS) {
|
||||
assert(0);
|
||||
}
|
||||
|
||||
window->frames++;
|
||||
window->vk.frame_index = (window->vk.frame_index + 1) % MAX_CONCURRENT_FRAMES;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue