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

Thomas Guillem git at videolan.org
Thu Mar 22 11:49:22 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 22 11:28:41 2018 +0100| [9c7b1d8fd3b9be3d33d6b22d10da19ddc1223b30] | 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 ?

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c7b1d8fd3b9be3d33d6b22d10da19ddc1223b30
---

 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 16ebf0cb3c..fbb361db2c 100644
--- a/modules/video_output/opengl/converter_sw.c
+++ b/modules/video_output/opengl/converter_sw.c
@@ -580,7 +580,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;
 
@@ -620,9 +624,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