summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan/context.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2019-12-22 03:55:07 +0100
committerNiklas Haas <git@haasn.xyz>2019-12-22 03:55:07 +0100
commit2a70140ba8a3f1f439c94ca1fe372dc53e61c467 (patch)
treeb129e3d1e605a492cb40c2042b50789d0fc8c19a /video/out/vulkan/context.c
parent93a6308bb762dc1c43e0301c7b6e977078bead9c (diff)
downloadmpv-2a70140ba8a3f1f439c94ca1fe372dc53e61c467.tar.bz2
mpv-2a70140ba8a3f1f439c94ca1fe372dc53e61c467.tar.xz
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).
Diffstat (limited to 'video/out/vulkan/context.c')
-rw-r--r--video/out/vulkan/context.c5
1 files changed, 5 insertions, 0 deletions
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