glapi: #include "util/glheader.h" in glapi_priv.h and glapitable.h directly
authorYonggang Luo <luoyonggang@gmail.com>
Wed, 2 Nov 2022 16:16:36 +0000 (00:16 +0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Nov 2022 16:07:31 +0000 (16:07 +0000)
So that we do not need define GLAPIENTRY repeatedly, always using the
GLAPIENTRY macro comes from GL/gl.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472>

src/glx/apple/apple_glapi.c
src/glx/apple/apple_xgl_api_read.c
src/glx/apple/apple_xgl_api_stereo.c
src/glx/apple/apple_xgl_api_viewport.c
src/mapi/glapi/gen/gl_gentable.py
src/mapi/glapi/gen/gl_table.py
src/mapi/glapi/glapi_dispatch.c
src/mapi/glapi/glapi_priv.h
src/mapi/glapi/tests/check_table.cpp
src/mapi/shared-glapi/tests/check_table.cpp

index 068f81a..075231d 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <GL/gl.h>
 
-#include "util/glheader.h"
 #include "glapi.h"
 #include "glapitable.h"
 
index 7a796f0..612f5f7 100644 (file)
@@ -37,7 +37,6 @@
 #include "glxclient.h"
 #include "apple_glx_context.h"
 #include "apple_xgl_api.h"
-#include "util/glheader.h"
 #include "glapitable.h"
 
 extern struct _glapi_table * __ogl_framework_api;
index 3fa2b9c..11a17a8 100644 (file)
@@ -40,7 +40,6 @@
 #include "glxclient.h"
 #include "apple_glx_context.h"
 #include "apple_xgl_api.h"
-#include "util/glheader.h"
 #include "glapitable.h"
 
 extern struct _glapi_table * __ogl_framework_api;
index f36d0fb..ccc896e 100644 (file)
@@ -30,7 +30,6 @@
 #include "glxclient.h"
 #include "apple_glx_context.h"
 #include "apple_xgl_api.h"
-#include "util/glheader.h"
 #include "glapitable.h"
 
 extern struct _glapi_table * __ogl_framework_api;
index f1b4c47..8cd470f 100644 (file)
@@ -49,8 +49,6 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
 #include <stdio.h>
 #include <string.h>
 
-#include "util/glheader.h"
-
 #include "glapi.h"
 #include "glapitable.h"
 
index ea119e4..ae42a08 100644 (file)
@@ -49,14 +49,7 @@ class PrintGlTable(gl_XML.gl_print_base):
                 f.return_type, f.name, arg_string, f.offset))
 
     def printRealHeader(self):
-        print('#ifndef GLAPIENTRYP')
-        print('# ifndef GLAPIENTRY')
-        print('#  define GLAPIENTRY')
-        print('# endif')
-        print('')
-        print('# define GLAPIENTRYP GLAPIENTRY *')
-        print('#endif')
-        print('')
+        print('#include "util/glheader.h"')
         print('')
         print('#ifdef __cplusplus')
         print('extern "C" {')
index b462c4a..0661c26 100644 (file)
 
 #endif /* logging */
 
-
-#ifndef GLAPIENTRY
-#define GLAPIENTRY
-#endif
-
 #ifdef GLX_INDIRECT_RENDERING
 /* those link to libglapi.a should provide the entry points */
 #define _GLAPI_SKIP_PROTO_ENTRY_POINTS
@@ -150,7 +145,7 @@ GL_API void GL_APIENTRY glBlendBarrier (void);
 GL_API void GL_APIENTRY glPrimitiveBoundingBox (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
 
 /* Enable frame pointer elimination on Windows, otherwise forgetting to add
- * APIENTRY to _mesa_* entrypoints will not cause crashes on debug builds, as
+ * GLAPIENTRY to _mesa_* entrypoints will not cause crashes on debug builds, as
  * the initial ESP value is saved in the EBP in the function prologue, then
  * restored on the epilogue, clobbering any corruption in the ESP pointer due
  * to mismatch in the callee calling convention.
index 04d8fd0..ec2dc46 100644 (file)
 #ifndef _GLAPI_PRIV_H
 #define _GLAPI_PRIV_H
 
-
-#define GL_GLEXT_PROTOTYPES
-#include "GL/gl.h"
-#include "GL/glext.h"
-
-typedef int GLclampx;
-
 #include "glapi/glapi.h"
+#include "util/glheader.h"
 
 
 #ifdef __cplusplus
index 93dbb9d..596f43f 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include <gtest/gtest.h>
-#include "util/glheader.h"
 
 #include "glapi/glapi.h"
 #include "glapitable.h"
index 6c20885..fdc9f75 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include <gtest/gtest.h>
-#include "util/glheader.h"
 
 #include "glapi/glapi.h"
 #include "glapitable.h"