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@redhat.com>
This commit is contained in:
parent
701f3a206d
commit
a63ab81f6b
|
@ -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;
|
||||
|
|
|
@ -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, },
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
@ -832,6 +835,8 @@ initializeExtensions(__GLXscreen * screen)
|
|||
if (dri->dri2->base.version >= 3) {
|
||||
__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,
|
||||
|
|
|
@ -356,6 +356,8 @@ initializeExtensions(__GLXscreen * screen)
|
|||
if (dri->swrast->base.version >= 3) {
|
||||
__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,
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue