summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/gen
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapi/glapi/gen')
-rw-r--r--src/mapi/glapi/gen/ARB_draw_instanced.xml28
-rw-r--r--src/mapi/glapi/gen/EXT_gpu_shader4.xml244
-rw-r--r--src/mapi/glapi/gen/EXT_separate_shader_objects.xml26
-rw-r--r--src/mapi/glapi/gen/EXT_texture_integer.xml98
-rw-r--r--src/mapi/glapi/gen/EXT_transform_feedback.xml45
-rw-r--r--src/mapi/glapi/gen/GL3x.xml (renamed from src/mapi/glapi/gen/GL3.xml)202
-rw-r--r--src/mapi/glapi/gen/Makefile21
-rw-r--r--src/mapi/glapi/gen/glX_proto_send.py6
-rw-r--r--src/mapi/glapi/gen/gl_API.xml13
-rw-r--r--src/mapi/glapi/gen/gl_SPARC_asm.py4
-rw-r--r--src/mapi/glapi/gen/gl_procs.py8
-rw-r--r--src/mapi/glapi/gen/gl_table.py42
-rw-r--r--src/mapi/glapi/gen/gl_x86_asm.py5
13 files changed, 532 insertions, 210 deletions
diff --git a/src/mapi/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml
index 5741a588c9..57bb776ac2 100644
--- a/src/mapi/glapi/gen/ARB_draw_instanced.xml
+++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml
@@ -6,36 +6,16 @@
<OpenGLAPI>
-<category name="3.1">
-
- <function name="DrawArraysInstanced" offset="assign">
- <param name="mode" type="GLenum"/>
- <param name="first" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="primcount" type="GLsizei"/>
- </function>
-
- <function name="DrawElementsInstanced" offset="assign">
- <param name="mode" type="GLenum"/>
- <param name="count" type="GLsizei"/>
- <param name="type" type="GLenum"/>
- <param name="indices" type="const GLvoid *"/>
- <param name="primcount" type="GLsizei"/>
- </function>
-
-</category>
-
-
<category name="GL_ARB_draw_instanced" number="44">
- <function name="DrawArraysInstancedARB" alias="DrawArraysInstanced">
+ <function name="DrawArraysInstancedARB" offset="assign">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="primcount" type="GLsizei"/>
</function>
- <function name="DrawElementsInstancedARB" alias="DrawElementsInstanced">
+ <function name="DrawElementsInstancedARB" offset="assign">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
@@ -48,14 +28,14 @@
<category name="GL_EXT_draw_instanced" number="327">
- <function name="DrawArraysInstancedEXT" alias="DrawArraysInstanced">
+ <function name="DrawArraysInstancedEXT" alias="DrawArraysInstancedARB">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="primcount" type="GLsizei"/>
</function>
- <function name="DrawElementsInstancedEXT" alias="DrawElementsInstanced">
+ <function name="DrawElementsInstancedEXT" alias="DrawElementsInstancedARB">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/EXT_gpu_shader4.xml b/src/mapi/glapi/gen/EXT_gpu_shader4.xml
new file mode 100644
index 0000000000..7a8944ea3b
--- /dev/null
+++ b/src/mapi/glapi/gen/EXT_gpu_shader4.xml
@@ -0,0 +1,244 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_EXT_gpu_shader4" number="326">
+
+ <enum name="VERTEX_ATTRIB_ARRAY_INTEGER_EXT" value="0x88FD"/>
+ <enum name="SAMPLER_1D_ARRAY_EXT" value="0x8DC0"/>
+ <enum name="SAMPLER_2D_ARRAY_EXT" value="0x8DC1"/>
+ <enum name="SAMPLER_BUFFER_EXT" value="0x8DC2"/>
+ <enum name="SAMPLER_1D_ARRAY_SHADOW_EXT" value="0x8DC3"/>
+ <enum name="SAMPLER_2D_ARRAY_SHADOW_EXT" value="0x8DC4"/>
+ <enum name="SAMPLER_CUBE_SHADOW_EXT" value="0x8DC5"/>
+ <enum name="UNSIGNED_INT_VEC2_EXT" value="0x8DC6"/>
+ <enum name="UNSIGNED_INT_VEC3_EXT" value="0x8DC7"/>
+ <enum name="UNSIGNED_INT_VEC4_EXT" value="0x8DC8"/>
+ <enum name="INT_SAMPLER_1D_EXT" value="0x8DC9"/>
+ <enum name="INT_SAMPLER_2D_EXT" value="0x8DCA"/>
+ <enum name="INT_SAMPLER_3D_EXT" value="0x8DCB"/>
+ <enum name="INT_SAMPLER_CUBE_EXT" value="0x8DCC"/>
+ <enum name="INT_SAMPLER_2D_RECT_EXT" value="0x8DCD"/>
+ <enum name="INT_SAMPLER_1D_ARRAY_EXT" value="0x8DCE"/>
+ <enum name="INT_SAMPLER_2D_ARRAY_EXT" value="0x8DCF"/>
+ <enum name="INT_SAMPLER_BUFFER_EXT" value="0x8DD0"/>
+ <enum name="UNSIGNED_INT_SAMPLER_1D_EXT" value="0x8DD1"/>
+ <enum name="UNSIGNED_INT_SAMPLER_2D_EXT" value="0x8DD2"/>
+ <enum name="UNSIGNED_INT_SAMPLER_3D_EXT" value="0x8DD3"/>
+ <enum name="UNSIGNED_INT_SAMPLER_CUBE_EXT" value="0x8DD4"/>
+ <enum name="UNSIGNED_INT_SAMPLER_2D_RECT_EXT" value="0x8DD5"/>
+ <enum name="UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT" value="0x8DD6"/>
+ <enum name="UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT" value="0x8DD7"/>
+ <enum name="UNSIGNED_INT_SAMPLER_BUFFER_EXT" value="0x8DD8"/>
+ <enum name="MIN_PROGRAM_TEXEL_OFFSET_EXT" value="0x8904">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_PROGRAM_TEXEL_OFFSET_EXT" value="0x8905">
+ <size name="Get" mode="get"/>
+ </enum>
+
+
+ <function name="VertexAttribI1iEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLint"/>
+ </function>
+
+ <function name="VertexAttribI2iEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ </function>
+
+ <function name="VertexAttribI3iEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ </function>
+
+ <function name="VertexAttribI4iEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ <param name="w" type="GLint"/>
+ </function>
+
+ <function name="VertexAttribI1uiEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLuint"/>
+ </function>
+
+ <function name="VertexAttribI2uiEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLuint"/>
+ <param name="y" type="GLuint"/>
+ </function>
+
+ <function name="VertexAttribI3uiEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLuint"/>
+ <param name="y" type="GLuint"/>
+ <param name="z" type="GLuint"/>
+ </function>
+
+ <function name="VertexAttribI4uiEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLuint"/>
+ <param name="y" type="GLuint"/>
+ <param name="z" type="GLuint"/>
+ <param name="w" type="GLuint"/>
+ </function>
+
+ <function name="VertexAttribI1ivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLint *"/>
+ </function>
+
+ <function name="VertexAttribI2ivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLint *"/>
+ </function>
+
+ <function name="VertexAttribI3ivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLint *"/>
+ </function>
+
+ <function name="VertexAttribI4ivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLint *"/>
+ </function>
+
+ <function name="VertexAttribI1uivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLuint *"/>
+ </function>
+
+ <function name="VertexAttribI2uivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLuint *"/>
+ </function>
+
+ <function name="VertexAttribI3uivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLuint *"/>
+ </function>
+
+ <function name="VertexAttribI4uivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLuint *"/>
+ </function>
+
+ <function name="VertexAttribI4bvEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLbyte *"/>
+ </function>
+
+ <function name="VertexAttribI4svEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLshort *"/>
+ </function>
+
+ <function name="VertexAttribI4ubvEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLubyte *"/>
+ </function>
+
+ <function name="VertexAttribI4usvEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLushort *"/>
+ </function>
+
+ <function name="VertexAttribIPointerEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </function>
+
+ <function name="GetVertexAttribIivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *"/>
+ </function>
+
+ <function name="GetVertexAttribIuivEXT" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLuint *"/>
+ </function>
+
+ <function name="Uniform1uiEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLuint"/>
+ </function>
+
+ <function name="Uniform2uiEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLuint"/>
+ <param name="y" type="GLuint"/>
+ </function>
+
+ <function name="Uniform3uiEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLuint"/>
+ <param name="y" type="GLuint"/>
+ <param name="z" type="GLuint"/>
+ </function>
+
+ <function name="Uniform4uiEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLuint"/>
+ <param name="y" type="GLuint"/>
+ <param name="z" type="GLuint"/>
+ <param name="w" type="GLuint"/>
+ </function>
+
+ <function name="Uniform1uivEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLuint *"/>
+ </function>
+
+ <function name="Uniform2uivEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLuint *"/>
+ </function>
+
+ <function name="Uniform3uivEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLuint *"/>
+ </function>
+
+ <function name="Uniform4uivEXT" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLuint *"/>
+ </function>
+
+ <function name="GetUniformuivEXT" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="location" type="GLint"/>
+ <param name="params" type="GLuint *"/>
+ </function>
+
+ <function name="BindFragDataLocationEXT" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="colorNumber" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ </function>
+
+ <function name="GetFragDataLocationEXT" offset="assign">
+ <return type="GLint"/>
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/EXT_separate_shader_objects.xml b/src/mapi/glapi/gen/EXT_separate_shader_objects.xml
new file mode 100644
index 0000000000..6ec56157c0
--- /dev/null
+++ b/src/mapi/glapi/gen/EXT_separate_shader_objects.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+<category name="GL_EXT_separate_shader_objects" number="377">
+ <!-- Alias of CURRENT_PROGRAM -->
+ <enum name="ACTIVE_PROGRAM_EXT" value="0x8B8D"/>
+
+ <function name="UseShaderProgramEXT" offset="assign">
+ <param name="type" type="GLenum"/>
+ <param name="program" type="GLuint"/>
+ </function>
+
+ <function name="ActiveProgramEXT" offset="assign">
+ <param name="program" type="GLuint"/>
+ </function>
+
+ <function name="CreateShaderProgramEXT" offset="assign">
+ <param name="type" type="GLenum"/>
+ <param name="string" type="const GLchar *"/>
+ <return type="GLuint"/>
+ </function>
+</category>
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/EXT_texture_integer.xml b/src/mapi/glapi/gen/EXT_texture_integer.xml
new file mode 100644
index 0000000000..7e5a8cbebe
--- /dev/null
+++ b/src/mapi/glapi/gen/EXT_texture_integer.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_EXT_texture_integer" number="343">
+
+ <enum name="RGBA_INTEGER_MODE_EXT" value="0x8D9E">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="RGBA32UI_EXT" value="0x8D70"/>
+ <enum name="RGB32UI_EXT" value="0x8D71"/>
+ <enum name="ALPHA32UI_EXT" value="0x8D72"/>
+ <enum name="INTENSITY32UI_EXT" value="0x8D73"/>
+ <enum name="LUMINANCE32UI_EXT" value="0x8D74"/>
+ <enum name="LUMINANCE_ALPHA32UI_EXT" value="0x8D75"/>
+ <enum name="RGBA16UI_EXT" value="0x8D76"/>
+ <enum name="RGB16UI_EXT" value="0x8D77"/>
+ <enum name="ALPHA16UI_EXT" value="0x8D78"/>
+ <enum name="INTENSITY16UI_EXT" value="0x8D79"/>
+ <enum name="LUMINANCE16UI_EXT" value="0x8D7A"/>
+ <enum name="LUMINANCE_ALPHA16UI_EXT" value="0x8D7B"/>
+ <enum name="RGBA8UI_EXT" value="0x8D7C"/>
+ <enum name="RGB8UI_EXT" value="0x8D7D"/>
+ <enum name="ALPHA8UI_EXT" value="0x8D7E"/>
+ <enum name="INTENSITY8UI_EXT" value="0x8D7F"/>
+ <enum name="LUMINANCE8UI_EXT" value="0x8D80"/>
+ <enum name="LUMINANCE_ALPHA8UI_EXT" value="0x8D81"/>
+ <enum name="RGBA32I_EXT" value="0x8D82"/>
+ <enum name="RGB32I_EXT" value="0x8D83"/>
+ <enum name="ALPHA32I_EXT" value="0x8D84"/>
+ <enum name="INTENSITY32I_EXT" value="0x8D85"/>
+ <enum name="LUMINANCE32I_EXT" value="0x8D86"/>
+ <enum name="LUMINANCE_ALPHA32I_EXT" value="0x8D87"/>
+ <enum name="RGBA16I_EXT" value="0x8D88"/>
+ <enum name="RGB16I_EXT" value="0x8D89"/>
+ <enum name="ALPHA16I_EXT" value="0x8D8A"/>
+ <enum name="INTENSITY16I_EXT" value="0x8D8B"/>
+ <enum name="LUMINANCE16I_EXT" value="0x8D8C"/>
+ <enum name="LUMINANCE_ALPHA16I_EXT" value="0x8D8D"/>
+ <enum name="RGBA8I_EXT" value="0x8D8E"/>
+ <enum name="RGB8I_EXT" value="0x8D8F"/>
+ <enum name="ALPHA8I_EXT" value="0x8D90"/>
+ <enum name="INTENSITY8I_EXT" value="0x8D91"/>
+ <enum name="LUMINANCE8I_EXT" value="0x8D92"/>
+ <enum name="LUMINANCE_ALPHA8I_EXT" value="0x8D93"/>
+ <enum name="RED_INTEGER_EXT" value="0x8D94"/>
+ <enum name="GREEN_INTEGER_EXT" value="0x8D95"/>
+ <enum name="BLUE_INTEGER_EXT" value="0x8D96"/>
+ <enum name="ALPHA_INTEGER_EXT" value="0x8D97"/>
+ <enum name="RGB_INTEGER_EXT" value="0x8D98"/>
+ <enum name="RGBA_INTEGER_EXT" value="0x8D99"/>
+ <enum name="BGR_INTEGER_EXT" value="0x8D9A"/>
+ <enum name="BGRA_INTEGER_EXT" value="0x8D9B"/>
+ <enum name="LUMINANCE_INTEGER_EXT" value="0x8D9C"/>
+ <enum name="LUMINANCE_ALPHA_INTEGER_EXT" value="0x8D9D"/>
+
+ <function name="ClearColorIiEXT" offset="assign">
+ <param name="r" type="GLint"/>
+ <param name="g" type="GLint"/>
+ <param name="b" type="GLint"/>
+ <param name="a" type="GLint"/>
+ </function>
+
+ <function name="ClearColorIuiEXT" offset="assign">
+ <param name="r" type="GLuint"/>
+ <param name="g" type="GLuint"/>
+ <param name="b" type="GLuint"/>
+ <param name="a" type="GLuint"/>
+ </function>
+
+ <function name="TexParameterIivEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *"/>
+ </function>
+
+ <function name="TexParameterIuivEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLuint *"/>
+ </function>
+
+ <function name="GetTexParameterIivEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *"/>
+ </function>
+
+ <function name="GetTexParameterIuivEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLuint *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/EXT_transform_feedback.xml b/src/mapi/glapi/gen/EXT_transform_feedback.xml
index 06deafce4e..051f1e0cc9 100644
--- a/src/mapi/glapi/gen/EXT_transform_feedback.xml
+++ b/src/mapi/glapi/gen/EXT_transform_feedback.xml
@@ -75,51 +75,6 @@
</category>
-<!-- Note: these 3.0 entrypoints might get moved to a new file -->
-
-<category name="3.0">
-
- <function name="BindBufferRange" alias="BindBufferRangeEXT">
- <param name="target" type="GLenum"/>
- <param name="index" type="GLuint"/>
- <param name="buffer" type="GLuint"/>
- <param name="offset" type="GLintptr"/>
- <param name="size" type="GLsizeiptr"/>
- </function>
-
- <function name="BindBufferBase" alias="BindBufferBaseEXT">
- <param name="target" type="GLenum"/>
- <param name="index" type="GLuint"/>
- <param name="buffer" type="GLuint"/>
- </function>
-
- <function name="BeginTransformFeedback" alias="BeginTransformFeedbackEXT">
- <param name="mode" type="GLenum"/>
- </function>
-
- <function name="EndTransformFeedback" alias="EndTransformFeedbackEXT">
- </function>
-
- <function name="TransformFeedbackVaryings" alias="TransformFeedbackVaryingsEXT">
- <param name="program" type="GLuint"/>
- <param name="count" type="GLsizei"/>
- <param name="varyings" type="const char **"/>
- <param name="bufferMode" type="GLenum"/>
- </function>
-
- <function name="GetTransformFeedbackVarying" alias="GetTransformFeedbackVaryingEXT">
- <param name="program" type="GLuint"/>
- <param name="index" type="GLuint"/>
- <param name="bufSize" type="GLsizei"/>
- <param name="length" type="GLsizei *"/>
- <param name="size" type="GLsizei *"/>
- <param name="type" type="GLenum *"/>
- <param name="name" type="GLchar *"/>
- </function>
-
-</category>
-
-
<category name="GL_ARB_transform_feedback2" number="93">
<enum name="TRANSFORM_FEEDBACK" value="0x8E22"/>
diff --git a/src/mapi/glapi/gen/GL3.xml b/src/mapi/glapi/gen/GL3x.xml
index 0d8d935f0a..8d15c94970 100644
--- a/src/mapi/glapi/gen/GL3.xml
+++ b/src/mapi/glapi/gen/GL3x.xml
@@ -3,7 +3,6 @@
<!-- Note: no GLX protocol info yet. -->
-
<OpenGLAPI>
<category name="3.0">
@@ -111,6 +110,8 @@
<enum name="BUFFER_MAP_LENGTH" value="0x9120"/>
<enum name="BUFFER_MAP_OFFSET" value="0x9121"/>
+ <!-- These functions are unique to GL3 -->
+
<function name="ClearBufferiv" offset="assign">
<param name="buffer" type="GLenum"/>
<param name="drawbuffer" type="GLint"/>
@@ -142,62 +143,71 @@
<return type="const GLubyte *"/>
</function>
- <function name="IsEnabledi" offset="assign">
- <param name="cap" type="GLenum"/>
- <param name="index" type="GLuint"/>
- <return type="GLboolean"/>
- </function>
-
- <function name="GetFragDataLocation" offset="assign">
- <param name="program" type="GLuint"/>
- <param name="name" type="const GLchar *"/>
- <return type="GLint"/>
+ <function name="ClampColor" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="clamp" type="GLenum"/>
</function>
- <function name="BindFragDataLocation" offset="assign">
- <param name="program" type="GLuint"/>
- <param name="color" type="GLuint"/>
- <param name="name" type="const GLchar *"/>
- </function>
+ <!-- These functions alias ones form GL_ARB_draw_buffers2 -->
- <function name="ColorMaski" offset="assign">
- <param name="index" type="GLuint"/>
+ <function name="ColorMaski" alias="ColorMaskIndexedEXT">
+ <param name="buf" type="GLuint"/>
<param name="r" type="GLboolean"/>
<param name="g" type="GLboolean"/>
<param name="b" type="GLboolean"/>
<param name="a" type="GLboolean"/>
</function>
- <function name="GetBooleani_v" offset="assign">
- <param name="cap" type="GLenum"/>
+ <function name="GetBooleani_v" alias="GetBooleanIndexedvEXT">
+ <param name="value" type="GLenum"/>
<param name="index" type="GLuint"/>
- <param name="value" type="GLboolean *"/>
+ <param name="data" type="GLboolean *"/>
</function>
- <function name="GetIntegeri_v" offset="assign">
- <param name="cap" type="GLenum"/>
+ <function name="GetIntegeri_v" alias="GetIntegerIndexedvEXT">
+ <param name="value" type="GLenum"/>
<param name="index" type="GLuint"/>
- <param name="value" type="GLint *"/>
+ <param name="data" type="GLint *"/>
</function>
- <function name="Enablei" offset="assign">
- <param name="cap" type="GLenum"/>
+ <function name="Enablei" alias="EnableIndexedEXT">
+ <param name="target" type="GLenum"/>
<param name="index" type="GLuint"/>
</function>
- <function name="Disablei" offset="assign">
- <param name="cap" type="GLenum"/>
+ <function name="Disablei" alias="DisableIndexedEXT">
+ <param name="target" type="GLenum"/>
<param name="index" type="GLuint"/>
</function>
- <function name="BeginTransformFeedback" offset="assign">
+ <function name="IsEnabledi" alias="IsEnabledIndexedEXT">
+ <param name="target" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <!-- These functions alias ones form GL_EXT_transform_feedback -->
+
+ <function name="GetFragDataLocation" alias="GetFragDataLocationEXT">
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ <return type="GLint"/>
+ </function>
+
+ <function name="BindFragDataLocation" alias="BindFragDataLocationEXT">
+ <param name="program" type="GLuint"/>
+ <param name="colorNumber" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ </function>
+
+ <function name="BeginTransformFeedback" alias="BeginTransformFeedbackEXT">
<param name="mode" type="GLenum"/>
</function>
- <function name="EndTransformFeedback" offset="assign">
+ <function name="EndTransformFeedback" alias="EndTransformFeedbackEXT">
</function>
- <function name="BindBufferRange" offset="assign">
+ <function name="BindBufferRange" alias="BindBufferRangeEXT">
<param name="target" type="GLenum"/>
<param name="index" type="GLuint"/>
<param name="buffer" type="GLuint"/>
@@ -205,20 +215,20 @@
<param name="size" type="GLsizeiptr"/>
</function>
- <function name="BindBufferBase" offset="assign">
+ <function name="BindBufferBase" alias="BindBufferBaseEXT">
<param name="target" type="GLenum"/>
<param name="index" type="GLuint"/>
<param name="buffer" type="GLuint"/>
</function>
- <function name="TransformFeedbackVaryings" offset="assign">
+ <function name="TransformFeedbackVaryings" alias="TransformFeedbackVaryingsEXT">
<param name="program" type="GLuint"/>
<param name="count" type="GLsizei"/>
<param name="varyings" type="const GLchar* *"/>
<param name="bufferMode" type="GLenum"/>
</function>
- <function name="GetTransformFeedbackVarying" offset="assign">
+ <function name="GetTransformFeedbackVarying" alias="GetTransformFeedbackVaryingEXT">
<param name="program" type="GLuint"/>
<param name="index" type="GLuint"/>
<param name="bufSize" type="GLsizei"/>
@@ -228,20 +238,19 @@
<param name="name" type="GLchar *"/>
</function>
- <function name="ClampColor" offset="assign">
- <param name="target" type="GLenum"/>
- <param name="clamp" type="GLenum"/>
- </function>
+ <!-- These functions alias ones from GL_NV_conditional_render -->
- <function name="BeginConditionalRender" offset="assign">
- <param name="id" type="GLuint"/>
+ <function name="BeginConditionalRender" alias="BeginConditionalRenderNV">
+ <param name="query" type="GLuint"/>
<param name="mode" type="GLenum"/>
</function>
- <function name="EndConditionalRender" offset="assign">
+ <function name="EndConditionalRender" alias="EndConditionalRenderNV">
</function>
- <function name="VertexAttribIPointer" offset="assign">
+ <!-- These functions alias ones from GL_EXT_gpu_shader4 -->
+
+ <function name="VertexAttribIPointer" alias="VertexAttribIPointerEXT">
<param name="index" type="GLuint"/>
<param name="size" type="GLint"/>
<param name="type" type="GLenum"/>
@@ -249,37 +258,37 @@
<param name="pointer" type="const GLvoid *"/>
</function>
- <function name="GetVertexAttribIiv" offset="assign">
+ <function name="GetVertexAttribIiv" alias="GetVertexAttribIivEXT">
<param name="index" type="GLuint"/>
<param name="pname" type="GLenum"/>
<param name="params" type="GLint *"/>
</function>
- <function name="GetVertexAttribIuiv" offset="assign">
+ <function name="GetVertexAttribIuiv" alias="GetVertexAttribIuivEXT">
<param name="index" type="GLuint"/>
<param name="pname" type="GLenum"/>
<param name="params" type="GLuint *"/>
</function>
- <function name="VertexAttribI1i" offset="assign">
+ <function name="VertexAttribI1i" alias="VertexAttribI1iEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
</function>
- <function name="VertexAttribI2i" offset="assign">
+ <function name="VertexAttribI2i" alias="VertexAttribI2iEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
</function>
- <function name="VertexAttribI3i" offset="assign">
+ <function name="VertexAttribI3i" alias="VertexAttribI3iEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
<param name="z" type="GLint"/>
</function>
- <function name="VertexAttribI4i" offset="assign">
+ <function name="VertexAttribI4i" alias="VertexAttribI4iEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
@@ -287,25 +296,25 @@
<param name="w" type="GLint"/>
</function>
- <function name="VertexAttribI1ui" offset="assign">
+ <function name="VertexAttribI1ui" alias="VertexAttribI1uiEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
</function>
- <function name="VertexAttribI2ui" offset="assign">
+ <function name="VertexAttribI2ui" alias="VertexAttribI2uiEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
</function>
- <function name="VertexAttribI3ui" offset="assign">
+ <function name="VertexAttribI3ui" alias="VertexAttribI3uiEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
<param name="z" type="GLuint"/>
</function>
- <function name="VertexAttribI4ui" offset="assign">
+ <function name="VertexAttribI4ui" alias="VertexAttribI4uiEXT">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
@@ -313,91 +322,91 @@
<param name="w" type="GLuint"/>
</function>
- <function name="VertexAttribI1iv" offset="assign">
+ <function name="VertexAttribI1iv" alias="VertexAttribI1ivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *"/>
</function>
- <function name="VertexAttribI2iv" offset="assign">
+ <function name="VertexAttribI2iv" alias="VertexAttribI2ivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *"/>
</function>
- <function name="VertexAttribI3iv" offset="assign">
+ <function name="VertexAttribI3iv" alias="VertexAttribI3ivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *"/>
</function>
- <function name="VertexAttribI4iv" offset="assign">
+ <function name="VertexAttribI4iv" alias="VertexAttribI4ivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *"/>
</function>
- <function name="VertexAttribI1uiv" offset="assign">
+ <function name="VertexAttribI1uiv" alias="VertexAttribI1uivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *"/>
</function>
- <function name="VertexAttribI2uiv" offset="assign">
+ <function name="VertexAttribI2uiv" alias="VertexAttribI2uivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *"/>
</function>
- <function name="VertexAttribI3uiv" offset="assign">
+ <function name="VertexAttribI3uiv" alias="VertexAttribI3uivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *"/>
</function>
- <function name="VertexAttribI4uiv" offset="assign">
+ <function name="VertexAttribI4uiv" alias="VertexAttribI4uivEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *"/>
</function>
- <function name="VertexAttribI4bv" offset="assign">
+ <function name="VertexAttribI4bv" alias="VertexAttribI4bvEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLbyte *"/>
</function>
- <function name="VertexAttribI4sv" offset="assign">
+ <function name="VertexAttribI4sv" alias="VertexAttribI4svEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLshort *"/>
</function>
- <function name="VertexAttribI4ubv" offset="assign">
+ <function name="VertexAttribI4ubv" alias="VertexAttribI4ubvEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLubyte *"/>
</function>
- <function name="VertexAttribI4usv" offset="assign">
+ <function name="VertexAttribI4usv" alias="VertexAttribI4usvEXT">
<param name="index" type="GLuint"/>
<param name="v" type="const GLushort *"/>
</function>
- <function name="GetUniformuiv" offset="assign">
+ <function name="GetUniformuiv" alias="GetUniformuivEXT">
<param name="program" type="GLuint"/>
<param name="location" type="GLint"/>
<param name="params" type="GLuint *"/>
</function>
- <function name="Uniform1ui" offset="assign">
- <param name="locatoin" type="GLint"/>
+ <function name="Uniform1ui" alias="Uniform1uiEXT">
+ <param name="location" type="GLint"/>
<param name="x" type="GLuint"/>
</function>
- <function name="Uniform2ui" offset="assign">
+ <function name="Uniform2ui" alias="Uniform2uiEXT">
<param name="location" type="GLint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
</function>
- <function name="Uniform3ui" offset="assign">
+ <function name="Uniform3ui" alias="Uniform3uiEXT">
<param name="location" type="GLint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
<param name="z" type="GLuint"/>
</function>
- <function name="Uniform4ui" offset="assign">
+ <function name="Uniform4ui" alias="Uniform4uiEXT">
<param name="location" type="GLint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
@@ -405,52 +414,54 @@
<param name="w" type="GLuint"/>
</function>
- <function name="Uniform1uiv" offset="assign">
+ <function name="Uniform1uiv" alias="Uniform1uivEXT">
<param name="location" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="value" type="const GLuint *"/>
</function>
- <function name="Uniform2uiv" offset="assign">
+ <function name="Uniform2uiv" alias="Uniform2uivEXT">
<param name="location" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="value" type="const GLuint *"/>
</function>
- <function name="Uniform3uiv" offset="assign">
+ <function name="Uniform3uiv" alias="Uniform3uivEXT">
<param name="location" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="value" type="const GLuint *"/>
</function>
- <function name="Uniform4uiv" offset="assign">
+ <function name="Uniform4uiv" alias="Uniform4uivEXT">
<param name="location" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="value" type="const GLuint *"/>
</function>
- <function name="TexParameterIiv" offset="assign">
+ <!-- These functions alias ones from GL_EXT_texture_integer -->
+
+ <function name="TexParameterIiv" alias="TexParameterIivEXT">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="value" type="const GLint *"/>
+ <param name="params" type="const GLint *"/>
</function>
- <function name="TexParameterIuiv" offset="assign">
+ <function name="TexParameterIuiv" alias="TexParameterIuivEXT">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="value" type="const GLuint *"/>
+ <param name="params" type="const GLuint *"/>
</function>
- <function name="GetTexParameterIiv" offset="assign">
+ <function name="GetTexParameterIiv" alias="GetTexParameterIivEXT">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="value" type="GLint *"/>
+ <param name="params" type="GLint *"/>
</function>
- <function name="GetTexParameterIuiv" offset="assign">
+ <function name="GetTexParameterIuiv" alias="GetTexParameterIuivEXT">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
- <param name="value" type="GLuint *"/>
+ <param name="params" type="GLuint *"/>
</function>
</category>
@@ -490,14 +501,14 @@
<enum name="PRIMITIVE_RESTART" value="0x8F9D"/>
<enum name="PRIMITIVE_RESTART_INDEX" value="0x8F9E"/>
- <function name="DrawArraysInstanced" offset="assign">
+ <function name="DrawArraysInstanced" alias="DrawArraysInstancedARB">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="primcount" type="GLsizei"/>
</function>
- <function name="DrawElementsInstanced" offset="assign">
+ <function name="DrawElementsInstanced" alias="DrawElementsInstancedARB">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
@@ -511,7 +522,7 @@
<param name="buffer" type="GLuint"/>
</function>
- <function name="glPrimitiveRestartIndex" offset="assign">
+ <function name="PrimitiveRestartIndex" alias="PrimitiveRestartIndexNV">
<param name="index" type="GLuint"/>
</function>
@@ -555,12 +566,6 @@
<param name="params" type="GLint64 *"/>
</function>
- <function name="ProgramParameteri" offset="assign">
- <param name="program" type="GLuint"/>
- <param name="pname" type="GLenum"/>
- <param name="value" type="GLint"/>
- </function>
-
<function name="FramebufferTexture" offset="assign">
<param name="target" type="GLenum"/>
<param name="attachment" type="GLenum"/>
@@ -568,12 +573,15 @@
<param name="level" type="GLint"/>
</function>
- <function name="FramebufferTextureFace" offset="assign">
- <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"/>
+</category>
+
+
+<category name="3.3">
+ <!-- There are other new functions and tokens defined by other extensions -->
+
+ <function name="VertexAttribDivisor" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="divisor" type="GLuint"/>
</function>
</category>
diff --git a/src/mapi/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile
index 657056bece..5a9b6ac4a8 100644
--- a/src/mapi/glapi/gen/Makefile
+++ b/src/mapi/glapi/gen/Makefile
@@ -14,9 +14,7 @@ MESA_GLX_DIR = $(TOP)/src/glx
MESA_GLAPI_OUTPUTS = \
$(MESA_GLAPI_DIR)/glprocs.h \
$(MESA_GLAPI_DIR)/glapitemp.h \
- $(MESA_GLAPI_DIR)/glapioffsets.h \
- $(MESA_GLAPI_DIR)/glapitable.h \
- $(MESA_GLAPI_DIR)/glapidispatch.h
+ $(MESA_GLAPI_DIR)/glapitable.h
MESA_GLAPI_ASM_OUTPUTS = \
$(MESA_GLAPI_DIR)/glapi_x86.S \
@@ -27,6 +25,7 @@ MESA_OUTPUTS = \
$(MESA_GLAPI_OUTPUTS) \
$(MESA_GLAPI_ASM_OUTPUTS) \
$(MESA_DIR)/main/enums.c \
+ $(MESA_DIR)/main/glapidispatch.h \
$(MESA_DIR)/main/remap_helper.h \
$(MESA_GLX_DIR)/indirect.c \
$(MESA_GLX_DIR)/indirect.h \
@@ -85,13 +84,18 @@ API_XML = \
APPLE_vertex_array_object.xml \
EXT_draw_buffers2.xml \
EXT_framebuffer_object.xml \
+ EXT_gpu_shader4.xml \
EXT_packed_depth_stencil.xml \
EXT_provoking_vertex.xml \
+ EXT_separate_shader_objects.xml \
EXT_texture_array.xml \
+ EXT_texture_integer.xml \
EXT_transform_feedback.xml \
NV_conditional_render.xml \
NV_primitive_restart.xml \
- OES_EGL_image.xml
+ OES_EGL_image.xml \
+ GL3x.xml
+
COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py
@@ -131,15 +135,9 @@ $(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
$(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-$(MESA_GLAPI_DIR)/glapioffsets.h: gl_offsets.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
$(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-$(MESA_GLAPI_DIR)/glapidispatch.h: gl_table.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
-
######################################################################
$(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON)
@@ -158,6 +156,9 @@ $(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON) $(ES_API)
-f $(MESA_GLAPI_DIR)/gen-es/es1_API.xml \
-f $(MESA_GLAPI_DIR)/gen-es/es2_API.xml > $@
+$(MESA_DIR)/main/glapidispatch.h: gl_table.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
+
$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
index bd41c9e667..17ebad0176 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -166,7 +166,6 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
print '#include "indirect.h"'
print '#include "glxclient.h"'
print '#include "indirect_size.h"'
- print '#include "glapidispatch.h"'
print '#include "glapi.h"'
print '#include "glthread.h"'
print '#include <GL/glxproto.h>'
@@ -375,7 +374,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
print ''
print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
print ' if (gc->isDirect) {'
- print ' %sCALL_%s(GET_DISPATCH(), (%s));' % (ret_string, func.name, func.get_called_parameter_string())
+ print ' %sGET_DISPATCH()->%s(%s);' % (ret_string, func.name, func.get_called_parameter_string())
print ' } else'
print '#endif'
print ' {'
@@ -994,6 +993,9 @@ extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
asdf = func.static_glx_name(n)
if asdf not in func.static_entry_points:
print 'extern HIDDEN %s gl%s(%s);' % (func.return_type, asdf, params)
+ # give it a easy-to-remember name
+ if func.client_handcode:
+ print '#define gl_dispatch_stub_%s gl%s' % (n, asdf)
else:
print 'GLAPI %s GLAPIENTRY gl%s(%s);' % (func.return_type, asdf, params)
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index d1139aa06e..2004647954 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -11383,7 +11383,7 @@
<function name="ProgramParameters4dvNV" offset="assign">
<param name="target" type="GLenum"/>
<param name="index" type="GLuint"/>
- <param name="num" type="GLuint" counter="true"/>
+ <param name="num" type="GLsizei" counter="true"/>
<param name="params" type="const GLdouble *" count="num" count_scale="4"/>
<glx rop="4187"/>
</function>
@@ -11391,7 +11391,7 @@
<function name="ProgramParameters4fvNV" offset="assign">
<param name="target" type="GLenum"/>
<param name="index" type="GLuint"/>
- <param name="num" type="GLuint" counter="true"/>
+ <param name="num" type="GLsizei" counter="true"/>
<param name="params" type="const GLfloat *" count="num" count_scale="4"/>
<glx rop="4186"/>
</function>
@@ -12318,6 +12318,9 @@
</function>
</category>
+<xi:include href="EXT_separate_shader_objects.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<!-- Unnumbered extensions sorted by name. -->
<category name="GL_ATI_blend_equation_separate">
@@ -12513,4 +12516,10 @@
<xi:include href="OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="EXT_texture_integer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<xi:include href="EXT_gpu_shader4.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="GL3x.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+
</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/gl_SPARC_asm.py b/src/mapi/glapi/gen/gl_SPARC_asm.py
index 33e752df38..400e684da0 100644
--- a/src/mapi/glapi/gen/gl_SPARC_asm.py
+++ b/src/mapi/glapi/gen/gl_SPARC_asm.py
@@ -39,8 +39,6 @@ class PrintGenericStubs(gl_XML.gl_print_base):
def printRealHeader(self):
- print '#include "glapi/glapioffsets.h"'
- print ''
print '#ifdef __arch64__'
print '#define GL_OFF(N)\t((N) * 8)'
print '#define GL_LL\t\tldx'
@@ -223,7 +221,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
for f in api.functionIterateByOffset():
name = f.dispatch_name()
- print '\tGL_STUB(gl%s, _gloffset_%s)' % (name, f.name)
+ print '\tGL_STUB(gl%s, %d)' % (name, f.offset)
if not f.is_static_entry_point(f.name):
print '\tHIDDEN(gl%s)' % (name)
diff --git a/src/mapi/glapi/gen/gl_procs.py b/src/mapi/glapi/gen/gl_procs.py
index 5de61fbdfe..a9ba48297a 100644
--- a/src/mapi/glapi/gen/gl_procs.py
+++ b/src/mapi/glapi/gen/gl_procs.py
@@ -96,7 +96,7 @@ typedef struct {
for func in api.functionIterateByOffset():
name = func.dispatch_name()
self.printFunctionString(func.name)
- table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.name))
+ table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.offset))
# The length of the function's name, plus 2 for "gl",
# plus 1 for the NUL.
@@ -112,9 +112,9 @@ typedef struct {
if func.has_different_protocol(n):
alt_name = "gl" + func.static_glx_name(n)
- table.append((base_offset, "gl" + name, alt_name, alt_name, func.name))
+ table.append((base_offset, "gl" + name, alt_name, alt_name, func.offset))
else:
- table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.name))
+ table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.offset))
base_offset += len(n) + 3
@@ -170,7 +170,7 @@ typedef struct {
print 'static const glprocs_table_t static_functions[] = {'
for info in table:
- print ' NAME_FUNC_OFFSET(%5u, %s, %s, %s, _gloffset_%s),' % info
+ print ' NAME_FUNC_OFFSET(%5u, %s, %s, %s, %d),' % info
print ' NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)'
print '};'
diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py
index 3bd7569e92..c7cb5a40a1 100644
--- a/src/mapi/glapi/gen/gl_table.py
+++ b/src/mapi/glapi/gen/gl_table.py
@@ -124,52 +124,54 @@ class PrintRemapTable(gl_XML.gl_print_base):
functions.append( [f, count] )
count += 1
else:
- abi_functions.append( f )
+ abi_functions.append( [f, -1] )
if self.es:
# remember functions with aliases
if len(f.entry_points) > 1:
alias_functions.append(f)
+ print '/* total number of offsets below */'
+ print '#define _gloffset_COUNT %d' % (len(abi_functions + functions))
+ print ''
- for f in abi_functions:
- print '#define CALL_%s(disp, parameters) (*((disp)->%s)) parameters' % (f.name, f.name)
- print '#define GET_%s(disp) ((disp)->%s)' % (f.name, f.name)
- print '#define SET_%s(disp, fn) ((disp)->%s = fn)' % (f.name, f.name)
-
+ for f, index in abi_functions:
+ print '#define _gloffset_%s %d' % (f.name, f.offset)
print ''
print '#if !defined(_GLAPI_USE_REMAP_TABLE)'
print ''
- for [f, index] in functions:
- print '#define CALL_%s(disp, parameters) (*((disp)->%s)) parameters' % (f.name, f.name)
- print '#define GET_%s(disp) ((disp)->%s)' % (f.name, f.name)
- print '#define SET_%s(disp, fn) ((disp)->%s = fn)' % (f.name, f.name)
+ for f, index in functions:
+ print '#define _gloffset_%s %d' % (f.name, f.offset)
print ''
- print '#else'
+ print '#else /* !_GLAPI_USE_REMAP_TABLE */'
print ''
+
print '#define driDispatchRemapTable_size %u' % (count)
print 'extern int driDispatchRemapTable[ driDispatchRemapTable_size ];'
print ''
- for [f, index] in functions:
+ for f, index in functions:
print '#define %s_remap_index %u' % (f.name, index)
print ''
- for [f, index] in functions:
- arg_string = gl_XML.create_parameter_string( f.parameters, 0 )
- cast = '%s (GLAPIENTRYP)(%s)' % (f.return_type, arg_string)
+ for f, index in functions:
+ print '#define _gloffset_%s driDispatchRemapTable[%s_remap_index]' % (f.name, f.name)
- print '#define CALL_%s(disp, parameters) CALL_by_offset(disp, (%s), driDispatchRemapTable[%s_remap_index], parameters)' % (f.name, cast, f.name)
- print '#define GET_%s(disp) GET_by_offset(disp, driDispatchRemapTable[%s_remap_index])' % (f.name, f.name)
- print '#define SET_%s(disp, fn) SET_by_offset(disp, driDispatchRemapTable[%s_remap_index], fn)' % (f.name, f.name)
+ print ''
+ print '#endif /* _GLAPI_USE_REMAP_TABLE */'
+ print ''
+ for f, index in abi_functions + functions:
+ arg_string = gl_XML.create_parameter_string( f.parameters, 0 )
+ cast = '%s (GLAPIENTRYP)(%s)' % (f.return_type, arg_string)
- print ''
- print '#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */'
+ print '#define CALL_%s(disp, parameters) CALL_by_offset(disp, (%s), _gloffset_%s, parameters)' % (f.name, cast, f.name)
+ print '#define GET_%s(disp) GET_by_offset(disp, _gloffset_%s)' % (f.name, f.name)
+ print '#define SET_%s(disp, fn) SET_by_offset(disp, _gloffset_%s, fn)' % (f.name, f.name)
if alias_functions:
print ''
diff --git a/src/mapi/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py
index 10dfa1ddb3..3b1d035f04 100644
--- a/src/mapi/glapi/gen/gl_x86_asm.py
+++ b/src/mapi/glapi/gen/gl_x86_asm.py
@@ -54,7 +54,6 @@ class PrintGenericStubs(gl_XML.gl_print_base):
def printRealHeader(self):
print '#include "x86/assyntax.h"'
- print '#include "glapi/glapioffsets.h"'
print ''
print '#if defined(STDCALL_API)'
print '# if defined(USE_MGL_NAMESPACE)'
@@ -215,7 +214,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
stack = self.get_stack_size(f)
alt = "%s@%u" % (name, stack)
- print '\tGL_STUB(%s, _gloffset_%s, %s)' % (name, f.name, alt)
+ print '\tGL_STUB(%s, %d, %s)' % (name, f.offset, alt)
if not f.is_static_entry_point(f.name):
print '\tHIDDEN(GL_PREFIX(%s, %s))' % (name, alt)
@@ -230,7 +229,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
if f.is_static_entry_point(n):
if n != f.name:
alt2 = "%s@%u" % (n, stack)
- text = '\tGL_STUB_ALIAS(%s, _gloffset_%s, %s, %s, %s)' % (n, f.name, alt2, name, alt)
+ text = '\tGL_STUB_ALIAS(%s, %d, %s, %s, %s)' % (n, f.offset, alt2, name, alt)
if f.has_different_protocol(n):
print '#ifndef GLX_INDIRECT_RENDERING'