forked from pool/vulkan-tools
Jan Engelhardt
0083608659
OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/vulkan-tools?expand=0&rev=93
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
From 8d2d3e22d684540fdc5a76c15e456fc2fd11e4b7 Mon Sep 17 00:00:00 2001
|
|
From: Juan Ramos <juan@lunarg.com>
|
|
Date: Wed, 19 Oct 2022 16:51:58 -0600
|
|
Subject: [PATCH] cubepp: Fix presentKHR assert
|
|
|
|
Currently cubepp fails on Debug builds and triggers an assert.
|
|
|
|
This avoids the assert by calling the appropriate presentKHR.
|
|
---
|
|
cube/cube.cpp | 13 +++++++------
|
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/cube/cube.cpp b/cube/cube.cpp
|
|
index aa3d7b20..90000789 100644
|
|
--- a/cube/cube.cpp
|
|
+++ b/cube/cube.cpp
|
|
@@ -706,14 +706,15 @@ void Demo::draw() {
|
|
VERIFY(change_owner_result == vk::Result::eSuccess);
|
|
}
|
|
|
|
+ const auto presentInfo = vk::PresentInfoKHR()
|
|
+ .setWaitSemaphores(separate_present_queue ? image_ownership_semaphores[frame_index]
|
|
+ : draw_complete_semaphores[frame_index])
|
|
+ .setSwapchains(swapchain)
|
|
+ .setImageIndices(current_buffer);
|
|
+
|
|
// If we are using separate queues we have to wait for image ownership,
|
|
// otherwise wait for draw complete
|
|
- auto present_result =
|
|
- present_queue.presentKHR(vk::PresentInfoKHR()
|
|
- .setWaitSemaphores(separate_present_queue ? image_ownership_semaphores[frame_index]
|
|
- : draw_complete_semaphores[frame_index])
|
|
- .setSwapchains(swapchain)
|
|
- .setImageIndices(current_buffer));
|
|
+ auto present_result = present_queue.presentKHR(&presentInfo);
|
|
frame_index += 1;
|
|
frame_index %= FRAME_LAG;
|
|
if (present_result == vk::Result::eErrorOutOfDateKHR) {
|
|
--
|
|
2.38.0
|
|
|