diff options
author | Niklas Haas <git@haasn.dev> | 2023-07-29 17:09:59 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2023-07-29 17:09:59 +0200 |
commit | f9dc695b580c394bf4f9833d36e91b7fcbe009ea (patch) | |
tree | 69d9125fd49c0eaf8f706af13be72ef2b8912914 /video | |
parent | 5fc305fa173ce47e904a5c420f26ff2badf25a6c (diff) | |
download | mpv-f9dc695b580c394bf4f9833d36e91b7fcbe009ea.tar.bz2 mpv-f9dc695b580c394bf4f9833d36e91b7fcbe009ea.tar.xz |
vo_gpu_next: delay swapchain submit until flip_frame()
Presents frames at the correct time when DS is disabled.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_gpu_next.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 5f3441ec2d..ddc22bcbde 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1063,14 +1063,17 @@ done: if (!valid) // clear with purple to indicate error pl_tex_clear(gpu, swframe.fbo, (float[4]){ 0.5, 0.0, 1.0, 1.0 }); - if (!pl_swapchain_submit_frame(p->sw)) - MP_ERR(vo, "Failed presenting frame!\n"); + pl_gpu_flush(gpu); } static void flip_page(struct vo *vo) { struct priv *p = vo->priv; struct ra_swapchain *sw = p->ra_ctx->swapchain; + + if (!pl_swapchain_submit_frame(p->sw)) + MP_ERR(vo, "Failed presenting frame!\n"); + sw->fns->swap_buffers(sw); } |