From 64890c411e05d8a87e9e692b1d8cf470e7d4488c Mon Sep 17 00:00:00 2001
From: Brendan King <Brendan.King@imgtec.com>
Date: Thu, 11 Nov 2021 12:09:38 +0000
Subject: [PATCH] GL_ARB_geometry_shader4 entry points.

---
 src/mapi/glapi/gen/ARB_geometry_shader4.xml | 97 +++++++++++++++++++++
 src/mapi/glapi/gen/gl_API.xml               |  2 +-
 src/mapi/glapi/gen/static_data.py           |  4 +
 3 files changed, 102 insertions(+), 1 deletion(-)
 create mode 100644 src/mapi/glapi/gen/ARB_geometry_shader4.xml

diff --git a/src/mapi/glapi/gen/ARB_geometry_shader4.xml b/src/mapi/glapi/gen/ARB_geometry_shader4.xml
new file mode 100644
index 0000000..d92dc57
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_geometry_shader4.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+<category name="GL_ARB_geometry_shader4" number="47">
+    <enum name="GEOMETRY_SHADER_ARB"                      value="0x8DD9"/>
+    <enum name="GEOMETRY_VERTICES_OUT_ARB"                value="0x8DDA"/>
+    <enum name="GEOMETRY_INPUT_TYPE_ARB"                  value="0x8DDB"/>
+    <enum name="GEOMETRY_OUTPUT_TYPE_ARB"                 value="0x8DDC"/>
+
+    <enum name="MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB"
+						count="1" value="0x8C29">
+	<size name="Get" mode="get"/>
+    </enum>
+    <enum name="MAX_GEOMETRY_VARYING_COMPONENTS_ARB"
+						count="1" value="0x8DDD">
+	<size name="Get" mode="get"/>
+    </enum>
+    <enum name="MAX_VERTEX_VARYING_COMPONENTS_ARB"
+						count="1" value="0x8DDE">
+	<size name="Get" mode="get"/>
+    </enum>
+    <enum name="MAX_VARYING_COMPONENTS"
+						count="1" value="0x8B4B">
+	<size name="Get" mode="get"/>
+    </enum>
+    <enum name="MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB"
+						count="1" value="0x8DDF">
+	<size name="Get" mode="get"/>
+    </enum>
+    <enum name="MAX_GEOMETRY_OUTPUT_VERTICES_ARB"
+						count="1" value="0x8DE0">
+	<size name="Get" mode="get"/>
+    </enum>
+    <enum name="MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB"
+						count="1" value="0x8DE1">
+	<size name="Get" mode="get"/>
+    </enum>
+
+    <enum name="LINES_ADJACENCY_ARB"                      value="0xA"/>
+    <enum name="LINE_STRIP_ADJACENCY_ARB"                 value="0xB"/>
+    <enum name="TRIANGLES_ADJACENCY_ARB"                  value="0xC"/>
+    <enum name="TRIANGLE_STRIP_ADJACENCY_ARB"             value="0xD"/>
+
+    <enum name="FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB" value="0x8DA8"/>
+    <enum name="FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB"   value="0x8DA9"/>
+
+
+    <enum name="FRAMEBUFFER_ATTACHMENT_LAYERED_ARB"
+						count="1" value="0x8DA7">
+        <size name="GetFramebufferAttachmentParameteriv" mode="get"/>
+    </enum>
+    <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"
+						count="1" value="0x8CD4">
+        <size name="GetFramebufferAttachmentParameteriv" mode="get"/>
+    </enum>
+
+    <enum name="PROGRAM_POINT_SIZE_ARB"                   value="0x8642"/>
+    <enum name="PROGRAM_POINT_SIZE_ARB"
+						count="1" value="0x8642">
+	<size name="Get" mode="get"/>
+    </enum>
+
+    <function name="ProgramParameteriARB" exec="dynamic">
+        <param name="program" type="GLuint"/>
+        <param name="pname" type="GLenum"/>
+        <param name="value" type="GLint"/>
+    </function>
+
+    <function name="FramebufferTextureARB" exec="dynamic">
+        <param name="target" type="GLenum"/>
+        <param name="attachment" type="GLenum"/>
+        <param name="texture" type="GLuint"/>
+        <param name="level" type="GLint"/>
+    </function>
+
+    <function name="FramebufferTextureLayerARB" exec="dynamic">
+        <param name="target" type="GLenum"/>
+        <param name="attachment" type="GLenum"/>
+        <param name="texture" type="GLuint"/>
+        <param name="level" type="GLint"/>
+        <param name="layer" type="GLint"/>
+    </function>
+
+    <function name="FramebufferTextureFaceARB" exec="dynamic">
+        <param name="target" type="GLenum"/>
+        <param name="attachment" type="GLenum"/>
+        <param name="texture" type="GLuint"/>
+        <param name="level" type="GLint"/>
+        <param name="face" type="GLenum"/>
+    </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 4e35de0..d5a5e7f 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8064,7 +8064,7 @@
 
 <!-- 46. GL_ARB_framebuffer_sRGB -->
 
-<!-- 47. GL_ARB_geometry_shader4. There are no intentions to implement this extension -->
+<xi:include href="ARB_geometry_shader4.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <!-- 48. GL_ARB_half_float_vertex -->
 
diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py
index 974f366..833ad73 100644
--- a/src/mapi/glapi/gen/static_data.py
+++ b/src/mapi/glapi/gen/static_data.py
@@ -1721,6 +1721,10 @@ offsets = {
     "FramebufferRenderbufferEXT" : 1685,
     "GetFramebufferAttachmentParameterivEXT" : 1686,
     "GenerateMipmapEXT" : 1687,
+    "ProgramParameteriARB" : 1688,
+    "FramebufferTextureARB" : 1689,
+    "FramebufferTextureLayerARB" : 1690,
+    "FramebufferTextureFaceARB" : 1691,
 }
 
 functions = [
