vo_gpu_next: delay swapchain submit until flip_frame()

Presents frames at the correct time when DS is disabled.
This commit is contained in:
Niklas Haas 2023-07-29 17:09:59 +02:00
parent 5fc305fa17
commit f9dc695b58
1 changed files with 5 additions and 2 deletions

View File

@ -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);
} }