[vlc-commits] opengl: improve pbo and buffer_storage extension check

Thomas Guillem git at videolan.org
Fri Mar 10 18:50:18 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 10 10:10:13 2017 +0100| [df65a32131918012f4f98e8ab5e6e5df080d8f41] | committer: Thomas Guillem

opengl: improve pbo and buffer_storage extension check

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

 modules/video_output/opengl/converters.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/opengl/converters.c b/modules/video_output/opengl/converters.c
index f9f2d7c..5e761ef 100644
--- a/modules/video_output/opengl/converters.c
+++ b/modules/video_output/opengl/converters.c
@@ -973,12 +973,16 @@ generic_init(const video_format_t *fmt, opengl_tex_converter_t *tc,
     if (allow_dr)
     {
 #ifdef VLCGL_HAS_MAP_PERSISTENT
-        const bool supports_map_persistent = tc->api->BufferStorage
+        const bool has_pbo =
+            HasExtension(tc->glexts, "GL_ARB_pixel_buffer_object") ||
+            HasExtension(tc->glexts, "GL_EXT_pixel_buffer_object");
+        const bool has_bs =
+            HasExtension(tc->glexts, "GL_ARB_buffer_storage") ||
+            HasExtension(tc->glexts, "GL_EXT_buffer_storage");
+        const bool supports_map_persistent = has_pbo && has_bs && tc->api->BufferStorage
             && tc->api->MapBufferRange && tc->api->FlushMappedBufferRange
             && tc->api->UnmapBuffer && tc->api->FenceSync && tc->api->DeleteSync
-            && tc->api->ClientWaitSync
-            && HasExtension(tc->glexts, "GL_ARB_pixel_buffer_object")
-            && HasExtension(tc->glexts, "GL_ARB_buffer_storage");
+            && tc->api->ClientWaitSync;
         if (supports_map_persistent)
         {
             tc->pf_get_pool = tc_persistent_get_pool;



More information about the vlc-commits mailing list