1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00

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.
This commit is contained in:
wm4 2018-02-08 01:38:24 +01:00 committed by Kevin Mitchell
parent ff08df5bb1
commit bff8cfe3f0

View File

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