Blame SOURCES/update-gl-h-to-match-mesa.patch

f0317a
From 5dfdc5a6dc60a3bdc63cd4510dabacba388da13a Mon Sep 17 00:00:00 2001
f0317a
From: Kyle Brenneman <kbrenneman@nvidia.com>
f0317a
Date: Tue, 22 Oct 2019 16:46:09 -0600
f0317a
Subject: [PATCH] Update GL/gl.h to match Mesa.
f0317a
f0317a
Updated GL/gl.h to match the copy from Mesa at commit
f0317a
a0829cf23b307ca44ab8c4505974fb7c8d71a35a.
f0317a
---
f0317a
 include/GL/gl.h | 147 ++++++------------------------------------------
f0317a
 1 file changed, 17 insertions(+), 130 deletions(-)
f0317a
f0317a
diff --git a/include/GL/gl.h b/include/GL/gl.h
f0317a
index 3f8cb62..2518dfb 100644
f0317a
--- a/include/GL/gl.h
f0317a
+++ b/include/GL/gl.h
f0317a
@@ -27,40 +27,24 @@
f0317a
 #ifndef __gl_h_
f0317a
 #define __gl_h_
f0317a
 
f0317a
-#if defined(USE_MGL_NAMESPACE)
f0317a
-#include "gl_mangle.h"
f0317a
-#endif
f0317a
-
f0317a
-
f0317a
 /**********************************************************************
f0317a
- * Begin system-specific stuff. Do not do any of this when building
f0317a
- * for SciTech SNAP, as this is all done before this header file is
f0317a
- * included. 
f0317a
+ * Begin system-specific stuff.
f0317a
  */
f0317a
-#if !defined(__SCITECH_SNAP__)
f0317a
-
f0317a
-#if defined(__BEOS__)
f0317a
-#include <stdlib.h>     /* to get some BeOS-isms */
f0317a
-#endif
f0317a
-
f0317a
-#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
f0317a
-#define OPENSTEP
f0317a
-#endif
f0317a
 
f0317a
 #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
f0317a
 #define __WIN32__
f0317a
 #endif
f0317a
 
f0317a
-#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
f0317a
+#if defined(__WIN32__) && !defined(__CYGWIN__)
f0317a
 #  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
f0317a
 #    define GLAPI __declspec(dllexport)
f0317a
 #  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
f0317a
 #    define GLAPI __declspec(dllimport)
f0317a
 #  else /* for use with static link lib build of Win32 edition only */
f0317a
 #    define GLAPI extern
f0317a
-#  endif /* _STATIC_MESA support */
f0317a
+#  endif
f0317a
 #  if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE)  /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
f0317a
-#    define GLAPIENTRY 
f0317a
+#    define GLAPIENTRY
f0317a
 #  else
f0317a
 #    define GLAPIENTRY __stdcall
f0317a
 #  endif
f0317a
@@ -72,10 +56,6 @@
f0317a
 #  define GLAPIENTRY
f0317a
 #endif /* WIN32 && !CYGWIN */
f0317a
 
f0317a
-#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
f0317a
-#  define PRAGMA_EXPORT_SUPPORTED		1
f0317a
-#endif
f0317a
-
f0317a
 /*
f0317a
  * WINDOWS: Include windows.h here to define APIENTRY.
f0317a
  * It is also useful when applications include this file by
f0317a
@@ -91,10 +71,6 @@
f0317a
 #include <windows.h>
f0317a
 #endif
f0317a
 
f0317a
-#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
f0317a
-#pragma import on
f0317a
-#endif
f0317a
-
f0317a
 #ifndef GLAPI
f0317a
 #define GLAPI extern
f0317a
 #endif
f0317a
@@ -116,15 +92,6 @@
f0317a
 #define GLAPIENTRYP GLAPIENTRY *
f0317a
 #endif
f0317a
 
f0317a
-#ifdef CENTERLINE_CLPP
f0317a
-#define signed
f0317a
-#endif
f0317a
-
f0317a
-#if defined(PRAGMA_EXPORT_SUPPORTED)
f0317a
-#pragma export on
f0317a
-#endif
f0317a
-
f0317a
-#endif /* !__SCITECH_SNAP__ */
f0317a
 /*
f0317a
  * End system-specific stuff.
f0317a
  **********************************************************************/
f0317a
@@ -718,7 +685,7 @@ typedef double		GLclampd;	/* double precision float in [0,1] */
f0317a
 #define GL_LIST_BIT				0x00020000
f0317a
 #define GL_TEXTURE_BIT				0x00040000
f0317a
 #define GL_SCISSOR_BIT				0x00080000
f0317a
-#define GL_ALL_ATTRIB_BITS			0x000FFFFF
f0317a
+#define GL_ALL_ATTRIB_BITS			0xFFFFFFFF
f0317a
 
f0317a
 
f0317a
 /* OpenGL 1.1 */
f0317a
@@ -1738,6 +1705,7 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
f0317a
 
f0317a
 
f0317a
 
f0317a
+
f0317a
 /*
f0317a
  * OpenGL 1.3
f0317a
  */
f0317a
@@ -2085,26 +2053,6 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
f0317a
 
f0317a
 
f0317a
 
f0317a
-#if GL_ARB_shader_objects
f0317a
-
f0317a
-#ifndef GL_MESA_shader_debug
f0317a
-#define GL_MESA_shader_debug 1
f0317a
-
f0317a
-#define GL_DEBUG_OBJECT_MESA              0x8759
f0317a
-#define GL_DEBUG_PRINT_MESA               0x875A
f0317a
-#define GL_DEBUG_ASSERT_MESA              0x875B
f0317a
-
f0317a
-GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
f0317a
-GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
f0317a
-GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
f0317a
-                                         GLsizei *length, GLcharARB *debugLog);
f0317a
-GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
f0317a
-
f0317a
-#endif /* GL_MESA_shader_debug */
f0317a
-
f0317a
-#endif /* GL_ARB_shader_objects */
f0317a
-
f0317a
-
f0317a
 /*
f0317a
  * ???. GL_MESA_packed_depth_stencil
f0317a
  * XXX obsolete
f0317a
@@ -2121,60 +2069,6 @@ GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logTyp
f0317a
 #endif /* GL_MESA_packed_depth_stencil */
f0317a
 
f0317a
 
f0317a
-#ifndef GL_MESA_program_debug
f0317a
-#define GL_MESA_program_debug 1
f0317a
-
f0317a
-#define GL_FRAGMENT_PROGRAM_POSITION_MESA       0x8bb0
f0317a
-#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA       0x8bb1
f0317a
-#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA  0x8bb2
f0317a
-#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA  0x8bb3
f0317a
-#define GL_VERTEX_PROGRAM_POSITION_MESA         0x8bb4
f0317a
-#define GL_VERTEX_PROGRAM_CALLBACK_MESA         0x8bb5
f0317a
-#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA    0x8bb6
f0317a
-#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA    0x8bb7
f0317a
-
f0317a
-typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
f0317a
-
f0317a
-GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
f0317a
-
f0317a
-GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
f0317a
-
f0317a
-#endif /* GL_MESA_program_debug */
f0317a
-
f0317a
-
f0317a
-#ifndef GL_MESA_texture_array
f0317a
-#define GL_MESA_texture_array 1
f0317a
-
f0317a
-/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array.
f0317a
- */
f0317a
-#ifndef GL_EXT_texture_array
f0317a
-
f0317a
-#ifdef GL_GLEXT_PROTOTYPES
f0317a
-GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target,
f0317a
-    GLenum attachment, GLuint texture, GLint level, GLint layer);
f0317a
-#endif /* GL_GLEXT_PROTOTYPES */
f0317a
-
f0317a
-#if 0
f0317a
-/* (temporarily) disabled because of collision with typedef in glext.h
f0317a
- * that happens if apps include both gl.h and glext.h
f0317a
- */
f0317a
-typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target,
f0317a
-    GLenum attachment, GLuint texture, GLint level, GLint layer);
f0317a
-#endif
f0317a
-
f0317a
-#define GL_TEXTURE_1D_ARRAY_EXT         0x8C18
f0317a
-#define GL_PROXY_TEXTURE_1D_ARRAY_EXT   0x8C19
f0317a
-#define GL_TEXTURE_2D_ARRAY_EXT         0x8C1A
f0317a
-#define GL_PROXY_TEXTURE_2D_ARRAY_EXT   0x8C1B
f0317a
-#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
f0317a
-#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
f0317a
-#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
f0317a
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
f0317a
-#endif
f0317a
-
f0317a
-#endif
f0317a
-
f0317a
-
f0317a
 #ifndef GL_ATI_blend_equation_separate
f0317a
 #define GL_ATI_blend_equation_separate 1
f0317a
 
f0317a
@@ -2186,27 +2080,20 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
f0317a
 #endif /* GL_ATI_blend_equation_separate */
f0317a
 
f0317a
 
f0317a
-/**
f0317a
- ** NOTE!!!!!  If you add new functions to this file, or update
f0317a
- ** glext.h be sure to regenerate the gl_mangle.h file.  See comments
f0317a
- ** in that file for details.
f0317a
- **/
f0317a
-
f0317a
-
f0317a
-
f0317a
-/**********************************************************************
f0317a
- * Begin system-specific stuff
f0317a
- */
f0317a
-#if defined(PRAGMA_EXPORT_SUPPORTED)
f0317a
-#pragma export off
f0317a
+/* GL_OES_EGL_image */
f0317a
+#if !defined(GL_OES_EGL_image) && !defined(GL_EXT_EGL_image_storage)
f0317a
+typedef void* GLeglImageOES;
f0317a
 #endif
f0317a
 
f0317a
-#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
f0317a
-#pragma import off
f0317a
+#ifndef GL_OES_EGL_image
f0317a
+#define GL_OES_EGL_image 1
f0317a
+#ifdef GL_GLEXT_PROTOTYPES
f0317a
+GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
f0317a
+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
f0317a
+#endif
f0317a
+typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
f0317a
+typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
f0317a
 #endif
f0317a
-/*
f0317a
- * End system-specific stuff
f0317a
- **********************************************************************/
f0317a
 
f0317a
 
f0317a
 #ifdef __cplusplus
f0317a
-- 
f0317a
2.22.0
f0317a