[vlc-commits] opengl: use PBO only if GL_EXT_unpack_subimage is available

Thomas Guillem git at videolan.org
Fri Mar 23 09:22:57 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 22 11:28:41 2018 +0100| [5580af48228637c652ffa7629f32f59a422d4aad] | committer: Thomas Guillem

opengl: use PBO only if GL_EXT_unpack_subimage is available

for glPixelStorei(GL_UNPACK_ROW_LENGTH,...)

Fixes CD 6ec2362d-e648-4a5f-a98c-e70191525173 ?

(cherry picked from commit 9c7b1d8fd3b9be3d33d6b22d10da19ddc1223b30)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5580af48228637c652ffa7629f32f59a422d4aad
---

 modules/video_output/opengl/converter_sw.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/opengl/converter_sw.c b/modules/video_output/opengl/converter_sw.c
index 8e710bba54..e784d2503d 100644
--- a/modules/video_output/opengl/converter_sw.c
+++ b/modules/video_output/opengl/converter_sw.c
@@ -587,7 +587,11 @@ opengl_tex_converter_generic_init(opengl_tex_converter_t *tc, bool allow_dr)
     tc->pf_update            = tc_common_update;
     tc->pf_allocate_textures = tc_common_allocate_textures;
 
-    if (allow_dr)
+    /* OpenGL or OpenGL ES2 with GL_EXT_unpack_subimage ext */
+    priv->has_unpack_subimage =
+        !tc->is_gles || HasExtension(tc->glexts, "GL_EXT_unpack_subimage");
+
+    if (allow_dr && priv->has_unpack_subimage)
     {
         bool supports_map_persistent = false;
 
@@ -627,9 +631,6 @@ opengl_tex_converter_generic_init(opengl_tex_converter_t *tc, bool allow_dr)
         }
     }
 
-    /* OpenGL or OpenGL ES2 with GL_EXT_unpack_subimage ext */
-    priv->has_unpack_subimage =
-        !tc->is_gles || HasExtension(tc->glexts, "GL_EXT_unpack_subimage");
     tc->fshader = fragment_shader;
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list