summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-08 01:38:24 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-11 17:45:51 -0800
commitbff8cfe3f0a8ec4235e32b23deec36d9a476b8d6 (patch)
treeda410db6e6719c0d71486adb07b1c6d6cec8e3b2
parentff08df5bb1708baa44664d51ca12a258fc85415d (diff)
downloadmpv-bff8cfe3f0a8ec4235e32b23deec36d9a476b8d6.tar.bz2
mpv-bff8cfe3f0a8ec4235e32b23deec36d9a476b8d6.tar.xz
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.
-rw-r--r--video/out/gpu/video.c5
1 files 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;