Module: Mesa
Branch: master
Commit: 8957c9e448670e5aa78065619692cf285f9b0a30
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8957c9e448670e5aa78065619692cf285f9b0a30

Author: Ian Romanick <[email protected]>
Date:   Tue Apr 14 09:24:06 2015 -0700

glx: Create proper server dependency for GLX_EXT_create_context_es2_profile

Previously GLX_EXT_create_context_es2_profile was marked as "direct
only" so that it would not depend on server support.  Since the
extension required functions that are part of
GLX_ARB_create_context_profile, support for the EXT was disabled if the
ARB was not supported.

This was complete rubbish.  If the server supported the ARB but not the
EXT, sending a request with GLX_CONTEXT_ES2_PROFILE_BIT_EXT would result
in GLXBadProfileARB.

Instead of the misguided hack, make GLX_EXT_create_context_es2_profile
properly depend on server support by not marking it as "direct only."

Signed-off-by: Ian Romanick <[email protected]>
Acked-by: José Fonseca <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Cc: Emil Velikov <[email protected]>

---

 src/glx/glxextensions.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index ce5d66d..a326f0d 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -84,7 +84,7 @@ static const struct extension_info known_glx_extensions[] = {
    { GLX(EXT_visual_rating),           VER(0,0), Y, Y, N, N },
    { GLX(EXT_fbconfig_packed_float),   VER(0,0), Y, Y, N, N },
    { GLX(EXT_framebuffer_sRGB),        VER(0,0), Y, Y, N, N },
-   { GLX(EXT_create_context_es2_profile), VER(0,0), Y, N, N, Y },
+   { GLX(EXT_create_context_es2_profile), VER(0,0), Y, N, N, N },
    { GLX(MESA_copy_sub_buffer),        VER(0,0), Y, N, N, N },
    { GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, Y, N },
    { GLX(MESA_query_renderer),         VER(0,0), Y, N, N, Y },
@@ -627,16 +627,6 @@ __glXCalculateUsableExtensions(struct glx_screen * psc,
       }
    }
 
-   /* This hack is necessary because GLX_ARB_create_context_profile depends on
-    * server support, but GLX_EXT_create_context_es2_profile is direct-only.
-    * Without this hack, it would be possible to advertise
-    * GLX_EXT_create_context_es2_profile without
-    * GLX_ARB_create_context_profile.  That would be a problem.
-    */
-   if (!IS_SET(server_support, ARB_create_context_profile_bit)) {
-      CLR_BIT(usable, EXT_create_context_es2_profile_bit);
-   }
-
    psc->effectiveGLXexts = __glXGetStringFromTable(known_glx_extensions,
                                                    usable);
 }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to