[Mesa-dev] [PATCH] include: update GL & GLES headers

Ian Romanick idr at freedesktop.org
Thu Aug 2 23:34:35 UTC 2018


On 08/02/2018 02:26 PM, Sagar Ghuge wrote:
> I have few comments below, I might be wrong about those but except that
> this patch looks good to me. I checked it against Khronos headers.
> 
> On 08/01/2018 11:34 AM, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> ---
>>   include/GL/glcorearb.h |  68 ++++++++++++++++--
>>   include/GL/glext.h     |  77 +++++++++++++++++---
>>   include/GL/glxext.h    |  22 ++++--
>>   include/GLES2/gl2.h    |   8 +--
>>   include/GLES2/gl2ext.h | 159 +++++++++++++++++++++++++++++++++++++++--
>>   include/GLES3/gl3.h    |   8 +--
>>   6 files changed, 309 insertions(+), 33 deletions(-)
>>
>> diff --git a/include/GL/glcorearb.h b/include/GL/glcorearb.h
>> index a78bbb6e182..82cbfbafbda 100644
>> --- a/include/GL/glcorearb.h
>> +++ b/include/GL/glcorearb.h
>> @@ -1,19 +1,19 @@
>> -#ifndef __glcorearb_h_
>> -#define __glcorearb_h_ 1
>> +#ifndef __gl_glcorearb_h_
>> +#define __gl_glcorearb_h_ 1
>>     #ifdef __cplusplus
>>   extern "C" {
>>   #endif
>>     /*
>> -** Copyright (c) 2013-2017 The Khronos Group Inc.
>> +** Copyright (c) 2013-2018 The Khronos Group Inc.
>>   **
>>   ** Permission is hereby granted, free of charge, to any person
>> obtaining a
>>   ** copy of this software and/or associated documentation files (the
>>   ** "Materials"), to deal in the Materials without restriction,
>> including
>>   ** without limitation the rights to use, copy, modify, merge, publish,
>>   ** distribute, sublicense, and/or sell copies of the Materials, and to
>>   ** permit persons to whom the Materials are furnished to do so,
>> subject to
>>   ** the following conditions:
>>   **
>>   ** The above copyright notice and this permission notice shall be
>> included
>> @@ -299,21 +299,21 @@ typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)
>> (GLenum pname, GLdouble *data);
>>   typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
>>   typedef void (APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat
>> *data);
>>   typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint
>> *data);
>>   typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
>>   typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint
>> level, GLenum format, GLenum type, void *pixels);
>>   typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target,
>> GLenum pname, GLfloat *params);
>>   typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target,
>> GLenum pname, GLint *params);
>>   typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum
>> target, GLint level, GLenum pname, GLfloat *params);
>>   typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum
>> target, GLint level, GLenum pname, GLint *params);
>>   typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
>> -typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) (GLdouble near, GLdouble
>> far);
>> +typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) (GLdouble n, GLdouble f);
>>   typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y,
>> GLsizei width, GLsizei height);
>>   #ifdef GL_GLEXT_PROTOTYPES
>>   GLAPI void APIENTRY glCullFace (GLenum mode);
>>   GLAPI void APIENTRY glFrontFace (GLenum mode);
>>   GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
>>   GLAPI void APIENTRY glLineWidth (GLfloat width);
>>   GLAPI void APIENTRY glPointSize (GLfloat size);
>>   GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode);
>>   GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width,
>> GLsizei height);
>>   GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname,
>> GLfloat param);
>> @@ -348,21 +348,21 @@ GLAPI void APIENTRY glGetDoublev (GLenum pname,
>> GLdouble *data);
>>   GLAPI GLenum APIENTRY glGetError (void);
>>   GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
>>   GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *data);
>>   GLAPI const GLubyte *APIENTRY glGetString (GLenum name);
>>   GLAPI void APIENTRY glGetTexImage (GLenum target, GLint level,
>> GLenum format, GLenum type, void *pixels);
>>   GLAPI void APIENTRY glGetTexParameterfv (GLenum target, GLenum
>> pname, GLfloat *params);
>>   GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum
>> pname, GLint *params);
>>   GLAPI void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint
>> level, GLenum pname, GLfloat *params);
>>   GLAPI void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint
>> level, GLenum pname, GLint *params);
>>   GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
>> -GLAPI void APIENTRY glDepthRange (GLdouble near, GLdouble far);
>> +GLAPI void APIENTRY glDepthRange (GLdouble n, GLdouble f);
>>   GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width,
>> GLsizei height);
>>   #endif
>>   #endif /* GL_VERSION_1_0 */
>>     #ifndef GL_VERSION_1_1
>>   #define GL_VERSION_1_1 1
>>   typedef float GLclampf;
>>   typedef double GLclampd;
>>   #define GL_COLOR_LOGIC_OP                 0x0BF2
>>   #define GL_POLYGON_OFFSET_UNITS           0x2A00
>> @@ -3951,20 +3951,34 @@ GLAPI void APIENTRY
>> glMaxShaderCompilerThreadsKHR (GLuint count);
>>   #endif /* GL_KHR_texture_compression_astc_hdr */
>>     #ifndef GL_KHR_texture_compression_astc_ldr
>>   #define GL_KHR_texture_compression_astc_ldr 1
>>   #endif /* GL_KHR_texture_compression_astc_ldr */
>>     #ifndef GL_KHR_texture_compression_astc_sliced_3d
>>   #define GL_KHR_texture_compression_astc_sliced_3d 1
>>   #endif /* GL_KHR_texture_compression_astc_sliced_3d */
>>   +#ifndef GL_AMD_framebuffer_multisample_advanced
>> +#define GL_AMD_framebuffer_multisample_advanced
> 
> I might be wrong but value is missing for a macro I guess. I am not sure
> but, are we just trying to expand it to nothing. Please let me know if I
> am missing something here.

This is the same as '#define GL_AMD_framebuffer_multisample_advanced 1'.
 As far as I'm aware, these header files are generated by a script, so
it's a little odd that these few defines are different from the others.
Either way, these files come directly from Khronos upstream, so there's
not much we can do about stylistic issues.


More information about the mesa-dev mailing list