0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vo_gpu: avoid error spam when ra_fbo fmt is non-storable

This simply makes the "is the destination FBO format bad?" check a tiny
bit less awful, by making sure we prefer storable FBO formats over
non-storable FBO formats. I'd love to make this also conditional on
whether or not we actually *need* a storable FBO format, but that logic
is decided later, in `pass_draw_to_screen`, and I don't want to
replicate the logic.

Fixes #7017.
This commit is contained in:
Niklas Haas 2020-03-08 21:28:01 +01:00
parent 3b4641a5a9
commit c145c80085

View File

@ -3286,6 +3286,8 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame,
const struct ra_format *fmt = fbo.tex->params.format;
if (fmt->dummy_format)
fmt = p->fbo_format;
if (!fmt->storable && p->fbo_format->storable)
fmt = p->fbo_format; // to be on the safe side
bool r = ra_tex_resize(p->ra, p->log, &p->output_tex,
fbo.tex->params.w, fbo.tex->params.h,
fmt);