summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra_gl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-29 20:11:51 +0200
committerwm4 <wm4@nowhere>2017-07-29 20:11:51 +0200
commit6fcc09ff3d0db649ff7a8d9fdcb49c0d0b700905 (patch)
tree880e041838d984d1792b780f83a85f2c84cca729 /video/out/opengl/ra_gl.c
parent67cda60da08b17a2cdeca04bb7ae72106aa45462 (diff)
downloadmpv-6fcc09ff3d0db649ff7a8d9fdcb49c0d0b700905.tar.bz2
mpv-6fcc09ff3d0db649ff7a8d9fdcb49c0d0b700905.tar.xz
vo_opengl: use ra_* for format negotiation too
Format handling via ra_* was added earlier, but the format negotiation part was forgotten. Actually move some aspects of it to ra_get_imgfmt_desc(). Also make sure the unorm and float formats selected by the common format lookup functions are linear filterable. (For OpenGL, this is implicitly guaranteed, so it wasn't done before.) Whether these assumptions should be checked/enforced in the ra code at all is a bit fuzzy, but with ra being helper code only for the actual video renderer, it's probably justified.
Diffstat (limited to 'video/out/opengl/ra_gl.c')
-rw-r--r--video/out/opengl/ra_gl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c
index bf926a197e..01f1fcd6e5 100644
--- a/video/out/opengl/ra_gl.c
+++ b/video/out/opengl/ra_gl.c
@@ -22,7 +22,10 @@ int ra_init_gl(struct ra *ra, GL *gl)
ra->caps |= RA_CAP_TEX_3D;
int gl_fmt_features = gl_format_feature_flags(gl);
+
+ // Test whether we can use 10 bit.
int depth16 = gl_determine_16bit_tex_depth(gl);
+ MP_VERBOSE(ra, "16 bit texture depth: %d.\n", depth16);
for (int n = 0; gl_formats[n].internal_format; n++) {
const struct gl_format *gl_fmt = &gl_formats[n];