Fix an error in benchmark mode using wayland
This commit is contained in:
parent
48fb28508b
commit
b82c3c83c6
1 changed files with 10 additions and 0 deletions
|
|
@ -299,6 +299,16 @@ void VulkanExampleBase::renderLoop()
|
|||
// - for macOS, handle benchmarking within NSApp rendering loop via displayLinkOutputCb()
|
||||
#if !(defined(VK_USE_PLATFORM_IOS_MVK) || defined(VK_USE_PLATFORM_MACOS_MVK))
|
||||
if (benchmark.active) {
|
||||
#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
|
||||
while (!configured)
|
||||
wl_display_dispatch(display);
|
||||
while (wl_display_prepare_read(display) != 0)
|
||||
wl_display_dispatch_pending(display);
|
||||
wl_display_flush(display);
|
||||
wl_display_read_events(display);
|
||||
wl_display_dispatch_pending(display);
|
||||
#endif
|
||||
|
||||
benchmark.run([=] { render(); }, vulkanDevice->properties);
|
||||
vkDeviceWaitIdle(device);
|
||||
if (benchmark.filename != "") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue