summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2018-05-01 15:58:16 +0300
committerJan Ekström <jeebjp@gmail.com>2018-05-01 19:24:53 +0300
commitdf65ac95baa8f1fa63fac89bd803368a3bf69e24 (patch)
treea11a37723e11be58458eb92755b5eab4f8c4e2ba
parentb18399befea7d4bdcc2c02a5116a589a20fb0302 (diff)
downloadmpv-df65ac95baa8f1fa63fac89bd803368a3bf69e24.tar.bz2
mpv-df65ac95baa8f1fa63fac89bd803368a3bf69e24.tar.xz
vo_gpu/video: add improved logging when a user-specified FBO fails
I don't know if we can just return from this function, so for now just adding this piece of logging.
-rw-r--r--video/out/gpu/video.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index f3cc6ae315..a725f939f5 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3524,19 +3524,30 @@ static void check_gl_features(struct gl_video *p)
const char *user_fbo_fmts[] = {p->opts.fbo_format, 0};
const char **fbo_fmts = user_fbo_fmts[0] && strcmp(user_fbo_fmts[0], "auto")
? user_fbo_fmts : auto_fbo_fmts;
+ bool user_specified_fbo_fmt = fbo_fmts == user_fbo_fmts;
+ bool fbo_test_result = false;
bool have_fbo = false;
p->fbo_format = NULL;
for (int n = 0; fbo_fmts[n]; n++) {
const char *fmt = fbo_fmts[n];
const struct ra_format *f = ra_find_named_format(p->ra, fmt);
- if (!f && fbo_fmts == user_fbo_fmts)
+ if (!f && user_specified_fbo_fmt)
MP_WARN(p, "FBO format '%s' not found!\n", fmt);
- if (f && f->renderable && f->linear_filter && test_fbo(p, f)) {
+ if (f && f->renderable && f->linear_filter &&
+ (fbo_test_result = test_fbo(p, f))) {
MP_VERBOSE(p, "Using FBO format %s.\n", f->name);
have_fbo = true;
p->fbo_format = f;
break;
}
+
+ if (user_specified_fbo_fmt) {
+ MP_WARN(p, "User-specified FBO format '%s' failed to initialize! "
+ "(exists=%d, renderable=%d, linear_filter=%d, "
+ "fbo_test_result=%d)\n",
+ fmt, !!f, f ? f->renderable : 0, f ? f->linear_filter : 0,
+ fbo_test_result);
+ }
}
if (!have_fragcoord && p->opts.dither_depth >= 0 &&