summaryrefslogtreecommitdiffstats
path: root/video/out/vo_gpu_next.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-11-04 10:01:24 -0500
committerDudemanguy <random342@airmail.cc>2021-11-04 15:59:56 +0000
commit662c793a557925319493297de8c941a636f18d73 (patch)
tree80d136570035e0a7c098035c24852db5eeeb60c2 /video/out/vo_gpu_next.c
parentacde63f05ade3f4da8424bb3b764966e9f7a3fc3 (diff)
downloadmpv-662c793a557925319493297de8c941a636f18d73.tar.bz2
mpv-662c793a557925319493297de8c941a636f18d73.tar.xz
vo_gpu_next: call start_frame in vulkan/context.c
In practice, this is for wayland. vo_gpu_next doesn't check the check_visible parameter since it didn't descend into the vulkan/context.c file when starting a frame. To make this happen, just call the start_frame function pointer but pass NULL as the ra_fbo. In there, we can do the visibility checks and after that bail out of the start_frame function if ra_fbo is NULL.
Diffstat (limited to 'video/out/vo_gpu_next.c')
-rw-r--r--video/out/vo_gpu_next.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 72c9cdb8ee..d2d2e9d9f5 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -577,6 +577,12 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
p->last_id = id;
}
+ // Doesn't draw anything. Only checks for visibility.
+ struct ra_swapchain *sw = p->ra_ctx->swapchain;
+ bool should_draw = sw->fns->start_frame(sw, NULL);
+ if (!should_draw)
+ return;
+
struct pl_swapchain_frame swframe;
if (!pl_swapchain_start_frame(p->sw, &swframe))
return;