From 2a70140ba8a3f1f439c94ca1fe372dc53e61c467 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 22 Dec 2019 03:55:07 +0100 Subject: vo_gpu: vulkan: set allow_suboptimal when possible This was added in libplacebo v1.29.0 and allows making resizes slightly smoother for clients that already handle resize events (such as mpv). --- video/out/vulkan/context.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'video/out/vulkan/context.c') diff --git a/video/out/vulkan/context.c b/video/out/vulkan/context.c index 3a8f58e4c4..a51a9a87db 100644 --- a/video/out/vulkan/context.c +++ b/video/out/vulkan/context.c @@ -183,6 +183,11 @@ bool ra_vk_ctx_init(struct ra_ctx *ctx, struct mpvk_ctx *vk, .surface = vk->surface, .present_mode = preferred_mode, .swapchain_depth = ctx->vo->opts->swapchain_depth, +#if PL_API_VER >= 29 + // mpv already handles resize events, so gracefully allow suboptimal + // swapchains to exist in order to make resizing even smoother + .allow_suboptimal = true, +#endif }; if (p->opts->swap_mode >= 0) // user override -- cgit v1.2.3