glx: Sync <GL/glxext.h> with Khronos

Minor fixups required to keep the prototypes matching and to remove
mention of retired enums.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Adam Jackson 2019-08-20 15:43:06 -04:00
parent 5ebd333c6c
commit 3dd299c3d5
8 changed files with 29 additions and 26 deletions

View File

@ -34,7 +34,7 @@ extern "C" {
** https://github.com/KhronosGroup/OpenGL-Registry
*/
#define GLX_GLXEXT_VERSION 20180525
#define GLX_GLXEXT_VERSION 20190728
/* Generated C header for:
* API: glx
@ -280,6 +280,14 @@ void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0,
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
#endif /* GLX_EXT_buffer_age */
#ifndef GLX_EXT_context_priority
#define GLX_EXT_context_priority 1
#define GLX_CONTEXT_PRIORITY_LEVEL_EXT 0x3100
#define GLX_CONTEXT_PRIORITY_HIGH_EXT 0x3101
#define GLX_CONTEXT_PRIORITY_MEDIUM_EXT 0x3102
#define GLX_CONTEXT_PRIORITY_LOW_EXT 0x3103
#endif /* GLX_EXT_context_priority */
#ifndef GLX_EXT_create_context_es2_profile
#define GLX_EXT_create_context_es2_profile 1
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
@ -476,7 +484,6 @@ GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixm
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
#define GLX_RENDERER_ID_MESA 0x818E
typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
@ -501,9 +508,9 @@ Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
#define GLX_MESA_set_3dfx_mode 1
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
typedef Bool ( *PFNGLXSET3DFXMODEMESAPROC) (int mode);
typedef GLboolean ( *PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#ifdef GLX_GLXEXT_PROTOTYPES
Bool glXSet3DfxModeMESA (int mode);
GLboolean glXSet3DfxModeMESA (GLint mode);
#endif
#endif /* GLX_MESA_set_3dfx_mode */
@ -836,13 +843,13 @@ int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int si
#define GLX_PBUFFER_SGIX 0x8023
typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
typedef int ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
typedef void ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
#ifdef GLX_GLXEXT_PROTOTYPES
GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
void glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
#endif
@ -940,9 +947,9 @@ int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
#ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1
typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
#ifdef GLX_GLXEXT_PROTOTYPES
Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
#endif
#endif /* GLX_SUN_get_transparent_index */

View File

@ -2495,7 +2495,7 @@ glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
}
PUBLIC int
PUBLIC void
glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute,
unsigned int *value)
{
@ -2503,7 +2503,7 @@ glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute,
if (!xmbuf) {
/* Generate GLXBadPbufferSGIX for bad pbuffer */
return 0;
return;
}
switch (attribute) {
@ -2525,7 +2525,6 @@ glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute,
default:
*value = 0;
}
return 0;
}
@ -2654,7 +2653,7 @@ glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer,
PUBLIC Status
glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay,
long *pTransparent)
unsigned long *pTransparent)
{
(void) dpy;
(void) overlay;

View File

@ -147,7 +147,7 @@ glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable,
}
_X_EXPORT int
_X_EXPORT void
glXQueryGLXPbufferSGIX(Display * dpy, GLXDrawable drawable,
int attribute, unsigned int *value)
{

View File

@ -834,11 +834,11 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable,
/**
* Query an attribute of a pbuffer.
*/
_GLX_PUBLIC int
_GLX_PUBLIC void
glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
int attribute, unsigned int *value)
{
return __glXGetDrawableAttribute(dpy, drawable, attribute, value);
__glXGetDrawableAttribute(dpy, drawable, attribute, value);
}
#endif

View File

@ -171,7 +171,6 @@ TEST_F(query_renderer_string_test, invalid_attribute)
E(GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA),
E(GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA),
E(GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA),
E(GLX_RENDERER_ID_MESA),
};
for (unsigned i = 0; i < ARRAY_SIZE(invalid_attributes); i++) {
@ -322,7 +321,6 @@ TEST_F(query_renderer_integer_test, invalid_attribute)
E(GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA + 0x10000),
E(GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA + 0x10000),
E(GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA + 0x10000),
E(GLX_RENDERER_ID_MESA + 0x10000),
};
for (unsigned i = 0; i < ARRAY_SIZE(invalid_attributes); i++) {

View File

@ -2536,14 +2536,14 @@ Fake_glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
}
static int
static void
Fake_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
{
const XMesaBuffer xmbuf = XMesaFindBuffer(dpy, pbuf);
if (!xmbuf) {
/* Generate GLXBadPbufferSGIX for bad pbuffer */
return 0;
return;
}
switch (attribute) {
@ -2565,7 +2565,6 @@ Fake_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, un
default:
*value = 0;
}
return 0;
}
@ -2687,7 +2686,7 @@ Fake_glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *p
/*** GLX_SUN_get_transparent_index ***/
static Status
Fake_glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
Fake_glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, unsigned long *pTransparent)
{
(void) dpy;
(void) overlay;

View File

@ -795,14 +795,14 @@ glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
t->DestroyGLXPbufferSGIX(dpy, pbuf);
}
int PUBLIC
void PUBLIC
glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
if (!t)
return 0;
return t->QueryGLXPbufferSGIX(dpy, pbuf, attribute, value);
return;
t->QueryGLXPbufferSGIX(dpy, pbuf, attribute, value);
}
void PUBLIC
@ -913,7 +913,7 @@ glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params
/*** GLX_SUN_get_transparent_index ***/
Status PUBLIC
glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, unsigned long *pTransparent)
{
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);

View File

@ -165,7 +165,7 @@ struct _glxapi_table {
#endif
/*** GLX_SUN_get_transparent_index ***/
Status (*GetTransparentIndexSUN)(Display *, Window, Window, long *);
Status (*GetTransparentIndexSUN)(Display *, Window, Window, unsigned long *);
/*** GLX_MESA_copy_sub_buffer ***/
void (*CopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);