From: PT Linux Launcher maintainers Subject: Avoid idle waits for direct Wayland resize configures The lazy-output-images backport leaves no shared output images allocated while Gamescope is presenting the game directly as Wayland planes. A host-window configure nevertheless calls vulkan_remake_output_images(), whose unconditional device-idle wait and output-sized blank-texture recreation stall the compositor thread for every intermediate drag size. Wait only when an output or screenshot image actually exists. The transparent fallback texture is unused by the non-session Wayland backend, so retain it across Wayland size changes; session backends preserve the existing recreation behavior. If a frame later requires full composition, the lazy allocation path creates correctly sized output images before rendering it. --- a/src/rendervulkan.cpp +++ b/src/rendervulkan.cpp @@ -3374,7 +3374,21 @@ static bool vulkan_ensure_output_images() bool vulkan_remake_output_images() { VulkanOutput_t *pOutput = &g_output; - g_device.waitIdle(); + bool bHasLiveImages = + !pOutput->outputImages.empty() && pOutput->outputImages[0]; + if ( !bHasLiveImages ) + { + for ( const auto &pScreenshotImage : pOutput->pScreenshotImages ) + { + if ( pScreenshotImage ) + { + bHasLiveImages = true; + break; + } + } + } + if ( bHasLiveImages ) + g_device.waitIdle(); pOutput->nOutImage = 0; @@ -3386,7 +3400,8 @@ bool vulkan_remake_output_images() { pOutput->outputImages.clear(); pOutput->outputImagesPartialOverlay.clear(); - pOutput->temporaryHackyBlankImage = vulkan_create_debug_blank_texture(); + if ( GetBackend()->IsSessionBased() || !pOutput->temporaryHackyBlankImage ) + pOutput->temporaryHackyBlankImage = vulkan_create_debug_blank_texture(); return true; }