diff options
author | Niklas Haas <git@haasn.xyz> | 2019-12-22 03:55:07 +0100 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2019-12-22 03:55:07 +0100 |
commit | 2a70140ba8a3f1f439c94ca1fe372dc53e61c467 (patch) | |
tree | b129e3d1e605a492cb40c2042b50789d0fc8c19a /video | |
parent | 93a6308bb762dc1c43e0301c7b6e977078bead9c (diff) | |
download | mpv-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')
-rw-r--r-- | video/out/vulkan/context.c | 5 |
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 |