summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2020-03-08 21:28:01 +0100
committerNiklas Haas <git@haasn.xyz>2020-03-08 21:32:06 +0100
commitc145c8008580629bd12a009678be16759f125e04 (patch)
tree8e5fbaa84f4dddd6508bd3442d4570aa64e532ef
parent3b4641a5a92b5a7926053b923e9da686c88e90df (diff)
downloadmpv-c145c8008580629bd12a009678be16759f125e04.tar.bz2
mpv-c145c8008580629bd12a009678be16759f125e04.tar.xz
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.
-rw-r--r--video/out/gpu/video.c2
1 files changed, 2 insertions, 0 deletions
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);