diff options
author | wm4 <wm4@nowhere> | 2017-08-08 17:53:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-08 17:53:19 +0200 |
commit | 7397e8ab42acd4dcb12943949e902e3df2738085 (patch) | |
tree | e2ae2522ae17dc49a9df862e5b18dd601d64298c /video/out/opengl/formats.c | |
parent | 6087f63003351812996823877a4abbd51a1f9530 (diff) | |
download | mpv-7397e8ab42acd4dcb12943949e902e3df2738085.tar.bz2 mpv-7397e8ab42acd4dcb12943949e902e3df2738085.tar.xz |
vo_opengl: add a hack for Apple's broken iOS hwdec stuff
As seen in hwdec_ios.m, it insists on using the legacy luminance alpha
formats for mapped textures.
Diffstat (limited to 'video/out/opengl/formats.c')
-rw-r--r-- | video/out/opengl/formats.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/video/out/opengl/formats.c b/video/out/opengl/formats.c index 7556bf21e2..56970d8b14 100644 --- a/video/out/opengl/formats.c +++ b/video/out/opengl/formats.c @@ -34,6 +34,12 @@ const struct gl_format gl_formats[] = { {"rgb16", GL_RGB16, GL_RGB, T_U16, F_TF | F_GL2}, {"rgba16", GL_RGBA16, GL_RGBA, T_U16, F_TF | F_GL2}, + // ES3 legacy. This is literally to compensate for Apple bugs in their iOS + // interop (can they do anything right?). ES3 still allows these formats, + // but they are deprecated. + {"l" , GL_LUMINANCE,GL_LUMINANCE, T_U8, F_CF | F_ES3}, + {"la",GL_LUMINANCE_ALPHA,GL_LUMINANCE_ALPHA, T_U8, F_CF | F_ES3}, + // ES2 legacy {"l" , GL_LUMINANCE,GL_LUMINANCE, T_U8, F_TF | F_ES2}, {"la",GL_LUMINANCE_ALPHA,GL_LUMINANCE_ALPHA, T_U8, F_TF | F_ES2}, @@ -88,6 +94,7 @@ const struct gl_format gl_formats[] = { // Special formats. {"rgb565", GL_RGB8, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, F_TF | F_GL2 | F_GL3}, + // Worthless, but needed by OSX videotoolbox interop on old Apple hardware. {"appleyp", GL_RGB, GL_RGB_422_APPLE, GL_UNSIGNED_SHORT_8_8_APPLE, F_TF | F_APPL}, |