xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Mon Feb 26 15:20:40 UTC 2018


 glx/createcontext.c    |    4 ++++
 glx/extension_string.c |    1 +
 glx/extension_string.h |    1 +
 glx/glxdri2.c          |   10 +++++++++-
 glx/glxdriswrast.c     |    2 ++
 glx/glxserver.h        |    4 ++++
 6 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 528c94c6501db936882cd06338e2250a0b884b36
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 20 11:03:46 2018 -0500

    glx: Fix indirect no-config contexts
    
    We would throw BadValue here for the GLX_SCREEN attribute. The upper
    dispatch layer already checks this, we can ignore it here.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 25ee9acf9..d402ca860 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -402,6 +402,9 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
                 return FALSE;
             }
             break;
+        case GLX_SCREEN:
+            /* already checked for us */
+            break;
         case GLX_CONTEXT_OPENGL_NO_ERROR_ARB:
             /* ignore */
             break;
commit a63ab81f6be7ad46b7e2d98a50aef4da5e664847
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 20 11:03:45 2018 -0500

    glx: Enable GLX_ARB_create_context_no_error (v2)
    
    This is mostly for the client library's convenience, if this extension
    is listed then it can know the attribute won't be rejected. Note that we
    don't honor this attribute for indirect contexts. That's fine, we don't
    want to introduce undefined behavior into a potentially privileged
    process.
    
    v2: Remember to ignore the attribute (Eric Anholt)
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/createcontext.c b/glx/createcontext.c
index 00c23fcdd..7d09c3a1c 100644
--- a/glx/createcontext.c
+++ b/glx/createcontext.c
@@ -218,6 +218,10 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
                 return BadValue;
             break;
 
+        case GLX_CONTEXT_OPENGL_NO_ERROR_ARB:
+            /* ignore */
+            break;
+
         default:
             if (!req->isDirect)
                 return BadValue;
diff --git a/glx/extension_string.c b/glx/extension_string.c
index 102f9dd42..354ce06f7 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -74,6 +74,7 @@ static const struct extension_info known_glx_extensions[] = {
     /* *INDENT-OFF* */
     { GLX(ARB_context_flush_control),   VER(0,0), N, },
     { GLX(ARB_create_context),          VER(0,0), N, },
+    { GLX(ARB_create_context_no_error), VER(0,0), N, },
     { GLX(ARB_create_context_profile),  VER(0,0), N, },
     { GLX(ARB_create_context_robustness), VER(0,0), N, },
     { GLX(ARB_fbconfig_float),          VER(0,0), N, },
diff --git a/glx/extension_string.h b/glx/extension_string.h
index f049f5840..eab385a3c 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -38,6 +38,7 @@ enum {
 /*   GLX_ARB_get_proc_address is implemented on the client. */
     ARB_context_flush_control_bit = 0,
     ARB_create_context_bit,
+    ARB_create_context_no_error_bit,
     ARB_create_context_profile_bit,
     ARB_create_context_robustness_bit,
     ARB_fbconfig_float_bit,
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 6887e199c..25ee9acf9 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -42,10 +42,10 @@
 #include <xf86.h>
 #include <dri2.h>
 
+#include <GL/glxtokens.h>
 #include "glxserver.h"
 #include "glxutil.h"
 #include "glxdricommon.h"
-#include <GL/glxtokens.h>
 
 #include "extension_string.h"
 
@@ -402,6 +402,9 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
                 return FALSE;
             }
             break;
+        case GLX_CONTEXT_OPENGL_NO_ERROR_ARB:
+            /* ignore */
+            break;
         default:
             /* If an unknown attribute is received, fail.
              */
@@ -833,6 +836,8 @@ initializeExtensions(__GLXscreen * screen)
         __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_ARB_create_context");
         __glXEnableExtension(screen->glx_enable_bits,
+                             "GLX_ARB_create_context_no_error");
+        __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_ARB_create_context_profile");
         __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_EXT_create_context_es_profile");
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index caad9a1fe..2858312de 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -357,6 +357,8 @@ initializeExtensions(__GLXscreen * screen)
         __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_ARB_create_context");
         __glXEnableExtension(screen->glx_enable_bits,
+                             "GLX_ARB_create_context_no_error");
+        __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_ARB_create_context_profile");
         __glXEnableExtension(screen->glx_enable_bits,
                              "GLX_EXT_create_context_es_profile");
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 60bdeb00d..79f4944d0 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -50,6 +50,10 @@
 #include <GL/glext.h>
 #include <GL/glxproto.h>
 
+#ifndef GLX_CONTEXT_OPENGL_NO_ERROR_ARB
+#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
+#endif
+
 /*
 ** GLX resources.
 */


More information about the xorg-commit mailing list