From bff8cfe3f0a8ec4235e32b23deec36d9a476b8d6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 8 Feb 2018 01:38:24 +0100 Subject: vo_gpu: use blit() only if target ra_tex supports it Even if RA_CAP_BLIT is set, this might just not be enabled for the target ra_tex. --- video/out/gpu/video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index ebf0234118..ea19fb1809 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3075,7 +3075,8 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, // texture to speed up subsequent re-draws (if any exist) struct ra_fbo dest_fbo = fbo; if (frame->num_vsyncs > 1 && frame->display_synced && - !p->dumb_mode && (p->ra->caps & RA_CAP_BLIT)) + !p->dumb_mode && (p->ra->caps & RA_CAP_BLIT) && + fbo.tex->params.blit_dst) { // Attempt to use the same format as the destination FBO // if possible. Some RAs use a wrapped dummy format here, @@ -3095,7 +3096,7 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, } // "output tex valid" and "output tex needed" are equivalent - if (p->output_tex_valid) { + if (p->output_tex_valid && fbo.tex->params.blit_dst) { pass_info_reset(p, true); pass_describe(p, "redraw cached frame"); struct mp_rect src = p->dst_rect; -- cgit v1.2.3