mirror of https://github.com/mpv-player/mpv
vo_gpu_next: delay swapchain submit until flip_frame()
Presents frames at the correct time when DS is disabled.
This commit is contained in:
parent
5fc305fa17
commit
f9dc695b58
|
@ -1063,14 +1063,17 @@ done:
|
||||||
if (!valid) // clear with purple to indicate error
|
if (!valid) // clear with purple to indicate error
|
||||||
pl_tex_clear(gpu, swframe.fbo, (float[4]){ 0.5, 0.0, 1.0, 1.0 });
|
pl_tex_clear(gpu, swframe.fbo, (float[4]){ 0.5, 0.0, 1.0, 1.0 });
|
||||||
|
|
||||||
if (!pl_swapchain_submit_frame(p->sw))
|
pl_gpu_flush(gpu);
|
||||||
MP_ERR(vo, "Failed presenting frame!\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void flip_page(struct vo *vo)
|
static void flip_page(struct vo *vo)
|
||||||
{
|
{
|
||||||
struct priv *p = vo->priv;
|
struct priv *p = vo->priv;
|
||||||
struct ra_swapchain *sw = p->ra_ctx->swapchain;
|
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);
|
sw->fns->swap_buffers(sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue