From c145c8008580629bd12a009678be16759f125e04 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 8 Mar 2020 21:28:01 +0100 Subject: 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. --- video/out/gpu/video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 88a8557cc2..13b7d55877 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -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); -- cgit v1.2.3