mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
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).
This commit is contained in:
parent
93a6308bb7
commit
2a70140ba8
@ -183,6 +183,11 @@ bool ra_vk_ctx_init(struct ra_ctx *ctx, struct mpvk_ctx *vk,
|
|||||||
.surface = vk->surface,
|
.surface = vk->surface,
|
||||||
.present_mode = preferred_mode,
|
.present_mode = preferred_mode,
|
||||||
.swapchain_depth = ctx->vo->opts->swapchain_depth,
|
.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
|
if (p->opts->swap_mode >= 0) // user override
|
||||||
|
Loading…
Reference in New Issue
Block a user