diff options
Diffstat (limited to 'mesalib/src/mapi/glapi/gen')
-rw-r--r-- | mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml | 116 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml | 76 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/ARB_draw_instanced.xml | 98 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/ARB_instanced_arrays.xml | 42 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/ARB_texture_buffer_object.xml | 44 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/EXT_separate_shader_objects.xml | 52 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/EXT_texture_integer.xml | 196 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml | 236 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/NV_primitive_restart.xml | 46 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/NV_texture_barrier.xml | 26 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/glX_API.xml | 440 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py | 546 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/gl_procs.py | 430 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/next_available_offset.sh | 78 |
14 files changed, 1213 insertions, 1213 deletions
diff --git a/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml b/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml index 5e348544a..d52a88c60 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml @@ -1,58 +1,58 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<OpenGLAPI>
-
-<category name="GL_ARB_ES2_compatibility" number="95">
- <enum name="FIXED" count="1" value="0x140C"/>
- <enum name="LOW_FLOAT" value="0x8DF0"/>
- <enum name="MEDIUM_FLOAT" value="0x8DF1"/>
- <enum name="HIGH_FLOAT" value="0x8DF2"/>
- <enum name="LOW_INT" value="0x8DF3"/>
- <enum name="MEDIUM_INT" value="0x8DF4"/>
- <enum name="HIGH_INT" value="0x8DF5"/>
- <enum name="SHADER_BINARY_FORMATS" value="0x8DF8"/>
- <enum name="NUM_SHADER_BINARY_FORMATS" value="0x8DF9"/>
- <enum name="SHADER_COMPILER" value="0x8DFA"/>
- <enum name="MAX_VERTEX_UNIFORM_VECTORS" value="0x8DFB"/>
- <enum name="MAX_VARYING_VECTORS" value="0x8DFC"/>
- <enum name="MAX_FRAGMENT_UNIFORM_VECTORS" value="0x8DFD"/>
-
- <function name="GetShaderPrecisionFormat" offset="assign">
- <param name="shadertype" type="GLenum"/>
- <param name="precisiontype" type="GLenum"/>
- <param name="range" type="GLint *"/>
- <param name="precision" type="GLint *"/>
- </function>
-
- <function name="ReleaseShaderCompiler" offset="assign">
- </function>
-
- <function name="ShaderBinary" offset="assign">
- <param name="n" type="GLsizei"/>
- <param name="shaders" type="const GLuint *"/>
- <param name="binaryformat" type="GLenum"/>
- <param name="binary" type="const GLvoid *"/>
- <param name="length" type="GLsizei"/>
- </function>
-
- <!-- from GL_OES_fixed_point -->
- <enum name="FIXED" value="0x140C"/>
- <type name="fixed" size="4" />
-
- <!-- from GL_OES_read_format -->
- <enum name="IMPLEMENTATION_COLOR_READ_TYPE" value="0x8B9A"/>
- <enum name="IMPLEMENTATION_COLOR_READ_FORMAT" value="0x8B9B"/>
-
- <!-- from GL_OES_single_precision -->
- <function name="ClearDepthf" offset="assign">
- <param name="depth" type="GLclampf"/>
- </function>
-
- <function name="DepthRangef" offset="assign">
- <param name="zNear" type="GLclampf"/>
- <param name="zFar" type="GLclampf"/>
- </function>
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<OpenGLAPI> + +<category name="GL_ARB_ES2_compatibility" number="95"> + <enum name="FIXED" count="1" value="0x140C"/> + <enum name="LOW_FLOAT" value="0x8DF0"/> + <enum name="MEDIUM_FLOAT" value="0x8DF1"/> + <enum name="HIGH_FLOAT" value="0x8DF2"/> + <enum name="LOW_INT" value="0x8DF3"/> + <enum name="MEDIUM_INT" value="0x8DF4"/> + <enum name="HIGH_INT" value="0x8DF5"/> + <enum name="SHADER_BINARY_FORMATS" value="0x8DF8"/> + <enum name="NUM_SHADER_BINARY_FORMATS" value="0x8DF9"/> + <enum name="SHADER_COMPILER" value="0x8DFA"/> + <enum name="MAX_VERTEX_UNIFORM_VECTORS" value="0x8DFB"/> + <enum name="MAX_VARYING_VECTORS" value="0x8DFC"/> + <enum name="MAX_FRAGMENT_UNIFORM_VECTORS" value="0x8DFD"/> + + <function name="GetShaderPrecisionFormat" offset="assign"> + <param name="shadertype" type="GLenum"/> + <param name="precisiontype" type="GLenum"/> + <param name="range" type="GLint *"/> + <param name="precision" type="GLint *"/> + </function> + + <function name="ReleaseShaderCompiler" offset="assign"> + </function> + + <function name="ShaderBinary" offset="assign"> + <param name="n" type="GLsizei"/> + <param name="shaders" type="const GLuint *"/> + <param name="binaryformat" type="GLenum"/> + <param name="binary" type="const GLvoid *"/> + <param name="length" type="GLsizei"/> + </function> + + <!-- from GL_OES_fixed_point --> + <enum name="FIXED" value="0x140C"/> + <type name="fixed" size="4" /> + + <!-- from GL_OES_read_format --> + <enum name="IMPLEMENTATION_COLOR_READ_TYPE" value="0x8B9A"/> + <enum name="IMPLEMENTATION_COLOR_READ_FORMAT" value="0x8B9B"/> + + <!-- from GL_OES_single_precision --> + <function name="ClearDepthf" offset="assign"> + <param name="depth" type="GLclampf"/> + </function> + + <function name="DepthRangef" offset="assign"> + <param name="zNear" type="GLclampf"/> + <param name="zFar" type="GLclampf"/> + </function> +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml b/mesalib/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml index b65f26b3d..0b6947cc5 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml @@ -1,38 +1,38 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-
-<OpenGLAPI>
-
-<category name="GL_ARB_draw_buffers_blend" number="69">
-
- <function name="BlendEquationiARB" offset="assign">
- <param name="buf" type="GLuint"/>
- <param name="mode" type="GLenum"/>
- </function>
-
- <function name="BlendEquationSeparateiARB" offset="assign">
- <param name="buf" type="GLuint"/>
- <param name="modeRGB" type="GLenum"/>
- <param name="modeA" type="GLenum"/>
- </function>
-
- <function name="BlendFunciARB" offset="assign">
- <param name="buf" type="GLuint"/>
- <param name="src" type="GLenum"/>
- <param name="dst" type="GLenum"/>
- </function>
-
- <function name="BlendFuncSeparateiARB" offset="assign">
- <param name="buf" type="GLuint"/>
- <param name="srcRGB" type="GLenum"/>
- <param name="dstRGB" type="GLenum"/>
- <param name="srcA" type="GLenum"/>
- <param name="dstA" type="GLenum"/>
- </function>
-
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_ARB_draw_buffers_blend" number="69"> + + <function name="BlendEquationiARB" offset="assign"> + <param name="buf" type="GLuint"/> + <param name="mode" type="GLenum"/> + </function> + + <function name="BlendEquationSeparateiARB" offset="assign"> + <param name="buf" type="GLuint"/> + <param name="modeRGB" type="GLenum"/> + <param name="modeA" type="GLenum"/> + </function> + + <function name="BlendFunciARB" offset="assign"> + <param name="buf" type="GLuint"/> + <param name="src" type="GLenum"/> + <param name="dst" type="GLenum"/> + </function> + + <function name="BlendFuncSeparateiARB" offset="assign"> + <param name="buf" type="GLuint"/> + <param name="srcRGB" type="GLenum"/> + <param name="dstRGB" type="GLenum"/> + <param name="srcA" type="GLenum"/> + <param name="dstA" type="GLenum"/> + </function> + +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/ARB_draw_instanced.xml b/mesalib/src/mapi/glapi/gen/ARB_draw_instanced.xml index 016e64799..57bb776ac 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_draw_instanced.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_draw_instanced.xml @@ -1,49 +1,49 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-
-<OpenGLAPI>
-
-<category name="GL_ARB_draw_instanced" number="44">
-
- <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" 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_EXT_draw_instanced" number="327">
-
- <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="DrawElementsInstancedARB">
- <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>
-
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_ARB_draw_instanced" number="44"> + + <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" 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_EXT_draw_instanced" number="327"> + + <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="DrawElementsInstancedARB"> + <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> + + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/ARB_instanced_arrays.xml b/mesalib/src/mapi/glapi/gen/ARB_instanced_arrays.xml index 86d78df0a..822f54374 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_instanced_arrays.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_instanced_arrays.xml @@ -1,21 +1,21 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-
-<OpenGLAPI>
-
-<category name="GL_ARB_instanced_arrays" number="49">
-
- <enum name="VERTEX_ATTRIB_ARRAY_DIVISOR_ARB" value="0x88FE"/>
-
- <function name="VertexAttribDivisorARB" offset="assign">
- <param name="index" type="GLuint"/>
- <param name="divisor" type="GLuint"/>
- </function>
-
-</category>
-
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_ARB_instanced_arrays" number="49"> + + <enum name="VERTEX_ATTRIB_ARRAY_DIVISOR_ARB" value="0x88FE"/> + + <function name="VertexAttribDivisorARB" offset="assign"> + <param name="index" type="GLuint"/> + <param name="divisor" type="GLuint"/> + </function> + +</category> + + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/ARB_texture_buffer_object.xml b/mesalib/src/mapi/glapi/gen/ARB_texture_buffer_object.xml index 82f0ec1dc..57680f553 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_texture_buffer_object.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_texture_buffer_object.xml @@ -1,22 +1,22 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<OpenGLAPI>
-
-<category name="GL_ARB_texture_buffer_object" number="51">
-
- <enum name="TEXTURE_BUFFER_ARB" value="0x8C2A"/>
- <enum name="MAX_TEXTURE_BUFFER_SIZE_ARB" value="0x8C2B"/>
- <enum name="TEXTURE_BINDING_BUFFER_ARB" value="0x8C2C"/>
- <enum name="TEXTURE_BUFFER_DATA_STORE_BINDING_ARB" value="0x8C2D"/>
- <enum name="TEXTURE_BUFFER_FORMAT_ARB" value="0x8C2E"/>
-
- <function name="TexBufferARB" offset="assign">
- <param name="target" type="GLenum"/>
- <param name="internalFormat" type="GLenum"/>
- <param name="buffer" type="GLuint"/>
- </function>
-
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<OpenGLAPI> + +<category name="GL_ARB_texture_buffer_object" number="51"> + + <enum name="TEXTURE_BUFFER_ARB" value="0x8C2A"/> + <enum name="MAX_TEXTURE_BUFFER_SIZE_ARB" value="0x8C2B"/> + <enum name="TEXTURE_BINDING_BUFFER_ARB" value="0x8C2C"/> + <enum name="TEXTURE_BUFFER_DATA_STORE_BINDING_ARB" value="0x8C2D"/> + <enum name="TEXTURE_BUFFER_FORMAT_ARB" value="0x8C2E"/> + + <function name="TexBufferARB" offset="assign"> + <param name="target" type="GLenum"/> + <param name="internalFormat" type="GLenum"/> + <param name="buffer" type="GLuint"/> + </function> + +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/EXT_separate_shader_objects.xml b/mesalib/src/mapi/glapi/gen/EXT_separate_shader_objects.xml index f338aa3b6..6ec56157c 100644 --- a/mesalib/src/mapi/glapi/gen/EXT_separate_shader_objects.xml +++ b/mesalib/src/mapi/glapi/gen/EXT_separate_shader_objects.xml @@ -1,26 +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>
+<?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/mesalib/src/mapi/glapi/gen/EXT_texture_integer.xml b/mesalib/src/mapi/glapi/gen/EXT_texture_integer.xml index c33c12d1d..7e5a8cbeb 100644 --- a/mesalib/src/mapi/glapi/gen/EXT_texture_integer.xml +++ b/mesalib/src/mapi/glapi/gen/EXT_texture_integer.xml @@ -1,98 +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>
+<?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/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml b/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml index bf9887a71..051f1e0cc 100644 --- a/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml +++ b/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml @@ -1,118 +1,118 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-
-<OpenGLAPI>
-
-<category name="GL_EXT_transform_feedback" number="352">
-
- <enum name="TRANSFORM_FEEDBACK_BUFFER_EXT" value="0x8C8E"/>
- <enum name="TRANSFORM_FEEDBACK_BUFFER_START_EXT" value="0x8C84"/>
- <enum name="TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT" value="0x8C85"/>
- <enum name="TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT" value="0x8C8F"/>
- <enum name="INTERLEAVED_ATTRIBS_EXT" value="0x8C8C"/>
- <enum name="SEPARATE_ATTRIBS_EXT" value="0x8C8D"/>
- <enum name="PRIMITIVES_GENERATED_EXT" value="0x8C87"/>
- <enum name="TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT" value="0x8C88"/>
- <enum name="RASTERIZER_DISCARD_EXT" value="0x8C89"/>
- <enum name="MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT" value="0x8C8A"/>
- <enum name="MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT" value="0x8C8B"/>
- <enum name="MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT" value="0x8C80"/>
- <enum name="TRANSFORM_FEEDBACK_VARYINGS_EXT" value="0x8C83"/>
- <enum name="TRANSFORM_FEEDBACK_BUFFER_MODE_EXT" value="0x8C7F"/>
- <enum name="TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT" value="0x8C76"/>
-
- <function name="BindBufferRangeEXT" offset="assign">
- <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="BindBufferOffsetEXT" offset="assign">
- <param name="target" type="GLenum"/>
- <param name="index" type="GLuint"/>
- <param name="buffer" type="GLuint"/>
- <param name="offset" type="GLintptr"/>
- </function>
-
- <function name="BindBufferBaseEXT" offset="assign">
- <param name="target" type="GLenum"/>
- <param name="index" type="GLuint"/>
- <param name="buffer" type="GLuint"/>
- </function>
-
- <function name="BeginTransformFeedbackEXT" offset="assign">
- <param name="mode" type="GLenum"/>
- </function>
-
- <function name="EndTransformFeedbackEXT" offset="assign">
- </function>
-
- <function name="TransformFeedbackVaryingsEXT" offset="assign">
- <param name="program" type="GLuint"/>
- <param name="count" type="GLsizei"/>
- <param name="varyings" type="const char **"/>
- <param name="bufferMode" type="GLenum"/>
- </function>
-
- <function name="GetTransformFeedbackVaryingEXT" offset="assign">
- <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>
-
- <!-- Note: the glGetIntegerIndexedvEXT() and glGetBooleanIndexedvEXT
- functions are defined in the EXT_draw_buffers2.xml file -->
-
-</category>
-
-
-<category name="GL_ARB_transform_feedback2" number="93">
-
- <enum name="TRANSFORM_FEEDBACK" value="0x8E22"/>
- <enum name="TRANSFORM_FEEDBACK_BUFFER_PAUSED" value="0x8E23"/>
- <enum name="TRANSFORM_FEEDBACK_BUFFER_ACTIVE" value="0x8E24"/>
- <enum name="TRANSFORM_FEEDBACK_BINDING" value="0x8E25"/>
-
- <function name="BindTransformFeedback" offset="assign">
- <param name="target" type="GLenum"/>
- <param name="id" type="GLuint"/>
- </function>
-
- <function name="DeleteTransformFeedbacks" offset="assign">
- <param name="n" type="GLsizei"/>
- <param name="ids" type="const GLuint *"/>
- </function>
-
- <function name="GenTransformFeedbacks" offset="assign">
- <param name="n" type="GLsizei"/>
- <param name="ids" type="GLuint *"/>
- </function>
-
- <function name="IsTransformFeedback" offset="assign">
- <param name="id" type="GLuint"/>
- <return type="GLboolean"/>
- </function>
-
- <function name="PauseTransformFeedback" offset="assign">
- </function>
-
- <function name="ResumeTransformFeedback" offset="assign">
- </function>
-
- <function name="DrawTransformFeedback" offset="assign">
- <param name="mode" type="GLenum"/>
- <param name="id" type="GLuint"/>
- </function>
-
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_EXT_transform_feedback" number="352"> + + <enum name="TRANSFORM_FEEDBACK_BUFFER_EXT" value="0x8C8E"/> + <enum name="TRANSFORM_FEEDBACK_BUFFER_START_EXT" value="0x8C84"/> + <enum name="TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT" value="0x8C85"/> + <enum name="TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT" value="0x8C8F"/> + <enum name="INTERLEAVED_ATTRIBS_EXT" value="0x8C8C"/> + <enum name="SEPARATE_ATTRIBS_EXT" value="0x8C8D"/> + <enum name="PRIMITIVES_GENERATED_EXT" value="0x8C87"/> + <enum name="TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT" value="0x8C88"/> + <enum name="RASTERIZER_DISCARD_EXT" value="0x8C89"/> + <enum name="MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT" value="0x8C8A"/> + <enum name="MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT" value="0x8C8B"/> + <enum name="MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT" value="0x8C80"/> + <enum name="TRANSFORM_FEEDBACK_VARYINGS_EXT" value="0x8C83"/> + <enum name="TRANSFORM_FEEDBACK_BUFFER_MODE_EXT" value="0x8C7F"/> + <enum name="TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT" value="0x8C76"/> + + <function name="BindBufferRangeEXT" offset="assign"> + <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="BindBufferOffsetEXT" offset="assign"> + <param name="target" type="GLenum"/> + <param name="index" type="GLuint"/> + <param name="buffer" type="GLuint"/> + <param name="offset" type="GLintptr"/> + </function> + + <function name="BindBufferBaseEXT" offset="assign"> + <param name="target" type="GLenum"/> + <param name="index" type="GLuint"/> + <param name="buffer" type="GLuint"/> + </function> + + <function name="BeginTransformFeedbackEXT" offset="assign"> + <param name="mode" type="GLenum"/> + </function> + + <function name="EndTransformFeedbackEXT" offset="assign"> + </function> + + <function name="TransformFeedbackVaryingsEXT" offset="assign"> + <param name="program" type="GLuint"/> + <param name="count" type="GLsizei"/> + <param name="varyings" type="const char **"/> + <param name="bufferMode" type="GLenum"/> + </function> + + <function name="GetTransformFeedbackVaryingEXT" offset="assign"> + <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> + + <!-- Note: the glGetIntegerIndexedvEXT() and glGetBooleanIndexedvEXT + functions are defined in the EXT_draw_buffers2.xml file --> + +</category> + + +<category name="GL_ARB_transform_feedback2" number="93"> + + <enum name="TRANSFORM_FEEDBACK" value="0x8E22"/> + <enum name="TRANSFORM_FEEDBACK_BUFFER_PAUSED" value="0x8E23"/> + <enum name="TRANSFORM_FEEDBACK_BUFFER_ACTIVE" value="0x8E24"/> + <enum name="TRANSFORM_FEEDBACK_BINDING" value="0x8E25"/> + + <function name="BindTransformFeedback" offset="assign"> + <param name="target" type="GLenum"/> + <param name="id" type="GLuint"/> + </function> + + <function name="DeleteTransformFeedbacks" offset="assign"> + <param name="n" type="GLsizei"/> + <param name="ids" type="const GLuint *"/> + </function> + + <function name="GenTransformFeedbacks" offset="assign"> + <param name="n" type="GLsizei"/> + <param name="ids" type="GLuint *"/> + </function> + + <function name="IsTransformFeedback" offset="assign"> + <param name="id" type="GLuint"/> + <return type="GLboolean"/> + </function> + + <function name="PauseTransformFeedback" offset="assign"> + </function> + + <function name="ResumeTransformFeedback" offset="assign"> + </function> + + <function name="DrawTransformFeedback" offset="assign"> + <param name="mode" type="GLenum"/> + <param name="id" type="GLuint"/> + </function> + +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/NV_primitive_restart.xml b/mesalib/src/mapi/glapi/gen/NV_primitive_restart.xml index 0b5588fd4..abe7dda00 100644 --- a/mesalib/src/mapi/glapi/gen/NV_primitive_restart.xml +++ b/mesalib/src/mapi/glapi/gen/NV_primitive_restart.xml @@ -1,23 +1,23 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-
-<OpenGLAPI>
-
-<category name="GL_NV_primitive_restart" number="285">
-
- <enum name="PRIMITIVE_RESTART_NV" value="0x8558"/>
- <enum name="PRIMITIVE_RESTART_INDEX_NV" value="0x8559"/>
-
- <function name="PrimitiveRestartNV" offset="assign">
- </function>
-
- <function name="PrimitiveRestartIndexNV" offset="assign">
- <param name="index" type="GLuint"/>
- </function>
-
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_NV_primitive_restart" number="285"> + + <enum name="PRIMITIVE_RESTART_NV" value="0x8558"/> + <enum name="PRIMITIVE_RESTART_INDEX_NV" value="0x8559"/> + + <function name="PrimitiveRestartNV" offset="assign"> + </function> + + <function name="PrimitiveRestartIndexNV" offset="assign"> + <param name="index" type="GLuint"/> + </function> + +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/NV_texture_barrier.xml b/mesalib/src/mapi/glapi/gen/NV_texture_barrier.xml index dc707d0ab..52b1a3c08 100644 --- a/mesalib/src/mapi/glapi/gen/NV_texture_barrier.xml +++ b/mesalib/src/mapi/glapi/gen/NV_texture_barrier.xml @@ -1,13 +1,13 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-
-<OpenGLAPI>
-
-<category name="GL_NV_texture_barrier" number="381">
- <function name="TextureBarrierNV" offset="assign" />
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_NV_texture_barrier" number="381"> + <function name="TextureBarrierNV" offset="assign" /> +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/glX_API.xml b/mesalib/src/mapi/glapi/gen/glX_API.xml index ac2f4ace1..9e02aa498 100644 --- a/mesalib/src/mapi/glapi/gen/glX_API.xml +++ b/mesalib/src/mapi/glapi/gen/glX_API.xml @@ -1,220 +1,220 @@ -<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<OpenGLAPI>
-
-<!-- Right now this file is just used to generate the GLX protocol
- decode tables on the server. The only information that is needed
- for that purpose is the name of the function (or pseudo-function
- in the case of Render of VendorPrivate) and its opcode. Once
- this file is used for other purposes, additional information will
- need to be added.
- -->
-
-<category name="1.0" window_system="glX">
- <function name="Render">
- <glx sop="1"/>
- </function>
-
- <function name="RenderLarge">
- <glx sop="2"/>
- </function>
-
- <function name="CreateContext">
- <glx sop="3"/>
- </function>
-
- <function name="DestroyContext">
- <glx sop="4"/>
- </function>
-
- <function name="MakeCurrent">
- <glx sop="5"/>
- </function>
-
- <function name="IsDirect">
- <glx sop="6"/>
- </function>
-
- <function name="QueryVersion">
- <glx sop="7"/>
- </function>
-
- <function name="WaitGL">
- <glx sop="8"/>
- </function>
-
- <function name="WaitX">
- <glx sop="9"/>
- </function>
-
- <function name="CopyContext">
- <glx sop="10"/>
- </function>
-
- <function name="SwapBuffers">
- <glx sop="11"/>
- </function>
-
- <function name="UseXFont">
- <glx sop="12"/>
- </function>
-
- <function name="CreateGLXPixmap">
- <glx sop="13"/>
- </function>
-
- <function name="GetVisualConfigs">
- <glx sop="14"/>
- </function>
-
- <function name="DestroyGLXPixmap">
- <glx sop="15"/>
- </function>
-
- <function name="VendorPrivate">
- <glx sop="16"/>
- </function>
-
- <function name="VendorPrivateWithReply">
- <glx sop="17"/>
- </function>
-
- <function name="QueryExtensionsString">
- <glx sop="18"/>
- </function>
-</category>
-
-<category name="1.1" window_system="glX">
- <function name="QueryServerString">
- <glx sop="19"/>
- </function>
-
- <function name="ClientInfo">
- <glx sop="20"/>
- </function>
-</category>
-
-<category name="1.3" window_system="glX">
- <function name="GetFBConfigs">
- <glx sop="21"/>
- </function>
-
- <function name="CreatePixmap">
- <glx sop="22"/>
- </function>
-
- <function name="DestroyPixmap">
- <glx sop="23"/>
- </function>
-
- <function name="CreateNewContext">
- <glx sop="24"/>
- </function>
-
- <function name="QueryContext">
- <glx sop="25"/>
- </function>
-
- <function name="MakeContextCurrent">
- <glx sop="26"/>
- </function>
-
- <function name="CreatePbuffer">
- <glx sop="27"/>
- </function>
-
- <function name="DestroyPbuffer">
- <glx sop="28"/>
- </function>
-
- <function name="GetDrawableAttributes">
- <glx sop="29"/>
- </function>
-
- <function name="ChangeDrawableAttributes">
- <glx sop="30"/>
- </function>
-
- <function name="CreateWindow">
- <glx sop="31"/>
- </function>
-
- <function name="DestroyWindow">
- <glx sop="32"/>
- </function>
-</category>
-
-<category name="GLX_SGI_swap_control" number="40" window_system="glX">
- <function name="SwapIntervalSGI">
- <return type="int"/>
- <glx vendorpriv="65536"/>
- </function>
-</category>
-
-<category name="GLX_SGI_make_current_read" number="42" window_system="glX">
- <function name="MakeCurrentReadSGI">
-<!-- <param name="dpy" type="Display *"/>
- <param name="draw" type="GLXDrawable"/>
- <param name="read" type="GLXDrawable"/>
- <param name="ctx" type="GLXContext"/> -->
- <return type="Bool"/>
- <glx vendorpriv="65537"/>
- </function>
-</category>
-
-<category name="GLX_EXT_import_context" number="47" window_system="glX">
- <function name="QueryContextInfoEXT">
- <glx vendorpriv="1024"/>
- </function>
-</category>
-
-<category name="GLX_SGIX_fbconfig" number="49" window_system="glX">
- <function name="GetFBConfigsSGIX">
- <glx vendorpriv="65540"/>
- </function>
-
- <function name="CreateContextWithConfigSGIX">
- <glx vendorpriv="65541"/>
- </function>
-
- <function name="CreateGLXPixmapWithConfigSGIX">
- <glx vendorpriv="65542"/>
- </function>
-</category>
-
-<category name="GLX_SGIX_pbuffer" number="50" window_system="glX">
- <function name="CreateGLXPbufferSGIX">
- <glx vendorpriv="65543"/>
- </function>
-
- <function name="DestroyGLXPbufferSGIX">
- <glx vendorpriv="65544"/>
- </function>
-
- <function name="ChangeDrawableAttributesSGIX">
- <glx vendorpriv="65545"/>
- </function>
-
- <function name="GetDrawableAttributesSGIX">
- <glx vendorpriv="65546"/>
- </function>
-</category>
-
-<category name="GLX_MESA_copy_sub_buffer" number="215">
- <function name="CopySubBufferMESA">
- <glx vendorpriv="5154"/>
- </function>
-</category>
-
-<category name="GLX_EXT_texture_from_pixmap">
- <function name="BindTexImageEXT">
- <glx vendorpriv="1330"/>
- </function>
-
- <function name="ReleaseTexImageEXT">
- <glx vendorpriv="1331"/>
- </function>
-</category>
-
-</OpenGLAPI>
+<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<OpenGLAPI> + +<!-- Right now this file is just used to generate the GLX protocol + decode tables on the server. The only information that is needed + for that purpose is the name of the function (or pseudo-function + in the case of Render of VendorPrivate) and its opcode. Once + this file is used for other purposes, additional information will + need to be added. + --> + +<category name="1.0" window_system="glX"> + <function name="Render"> + <glx sop="1"/> + </function> + + <function name="RenderLarge"> + <glx sop="2"/> + </function> + + <function name="CreateContext"> + <glx sop="3"/> + </function> + + <function name="DestroyContext"> + <glx sop="4"/> + </function> + + <function name="MakeCurrent"> + <glx sop="5"/> + </function> + + <function name="IsDirect"> + <glx sop="6"/> + </function> + + <function name="QueryVersion"> + <glx sop="7"/> + </function> + + <function name="WaitGL"> + <glx sop="8"/> + </function> + + <function name="WaitX"> + <glx sop="9"/> + </function> + + <function name="CopyContext"> + <glx sop="10"/> + </function> + + <function name="SwapBuffers"> + <glx sop="11"/> + </function> + + <function name="UseXFont"> + <glx sop="12"/> + </function> + + <function name="CreateGLXPixmap"> + <glx sop="13"/> + </function> + + <function name="GetVisualConfigs"> + <glx sop="14"/> + </function> + + <function name="DestroyGLXPixmap"> + <glx sop="15"/> + </function> + + <function name="VendorPrivate"> + <glx sop="16"/> + </function> + + <function name="VendorPrivateWithReply"> + <glx sop="17"/> + </function> + + <function name="QueryExtensionsString"> + <glx sop="18"/> + </function> +</category> + +<category name="1.1" window_system="glX"> + <function name="QueryServerString"> + <glx sop="19"/> + </function> + + <function name="ClientInfo"> + <glx sop="20"/> + </function> +</category> + +<category name="1.3" window_system="glX"> + <function name="GetFBConfigs"> + <glx sop="21"/> + </function> + + <function name="CreatePixmap"> + <glx sop="22"/> + </function> + + <function name="DestroyPixmap"> + <glx sop="23"/> + </function> + + <function name="CreateNewContext"> + <glx sop="24"/> + </function> + + <function name="QueryContext"> + <glx sop="25"/> + </function> + + <function name="MakeContextCurrent"> + <glx sop="26"/> + </function> + + <function name="CreatePbuffer"> + <glx sop="27"/> + </function> + + <function name="DestroyPbuffer"> + <glx sop="28"/> + </function> + + <function name="GetDrawableAttributes"> + <glx sop="29"/> + </function> + + <function name="ChangeDrawableAttributes"> + <glx sop="30"/> + </function> + + <function name="CreateWindow"> + <glx sop="31"/> + </function> + + <function name="DestroyWindow"> + <glx sop="32"/> + </function> +</category> + +<category name="GLX_SGI_swap_control" number="40" window_system="glX"> + <function name="SwapIntervalSGI"> + <return type="int"/> + <glx vendorpriv="65536"/> + </function> +</category> + +<category name="GLX_SGI_make_current_read" number="42" window_system="glX"> + <function name="MakeCurrentReadSGI"> +<!-- <param name="dpy" type="Display *"/> + <param name="draw" type="GLXDrawable"/> + <param name="read" type="GLXDrawable"/> + <param name="ctx" type="GLXContext"/> --> + <return type="Bool"/> + <glx vendorpriv="65537"/> + </function> +</category> + +<category name="GLX_EXT_import_context" number="47" window_system="glX"> + <function name="QueryContextInfoEXT"> + <glx vendorpriv="1024"/> + </function> +</category> + +<category name="GLX_SGIX_fbconfig" number="49" window_system="glX"> + <function name="GetFBConfigsSGIX"> + <glx vendorpriv="65540"/> + </function> + + <function name="CreateContextWithConfigSGIX"> + <glx vendorpriv="65541"/> + </function> + + <function name="CreateGLXPixmapWithConfigSGIX"> + <glx vendorpriv="65542"/> + </function> +</category> + +<category name="GLX_SGIX_pbuffer" number="50" window_system="glX"> + <function name="CreateGLXPbufferSGIX"> + <glx vendorpriv="65543"/> + </function> + + <function name="DestroyGLXPbufferSGIX"> + <glx vendorpriv="65544"/> + </function> + + <function name="ChangeDrawableAttributesSGIX"> + <glx vendorpriv="65545"/> + </function> + + <function name="GetDrawableAttributesSGIX"> + <glx vendorpriv="65546"/> + </function> +</category> + +<category name="GLX_MESA_copy_sub_buffer" number="215"> + <function name="CopySubBufferMESA"> + <glx vendorpriv="5154"/> + </function> +</category> + +<category name="GLX_EXT_texture_from_pixmap"> + <function name="BindTexImageEXT"> + <glx vendorpriv="1330"/> + </function> + + <function name="ReleaseTexImageEXT"> + <glx vendorpriv="1331"/> + </function> +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py b/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py index bd904bee2..400e684da 100644 --- a/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py +++ b/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py @@ -1,273 +1,273 @@ -#!/usr/bin/env python
-
-# (C) Copyright IBM Corporation 2004
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#
-# Authors:
-# Ian Romanick <idr@us.ibm.com>
-
-import license
-import gl_XML, glX_XML
-import sys, getopt
-
-class PrintGenericStubs(gl_XML.gl_print_base):
- def __init__(self):
- gl_XML.gl_print_base.__init__(self)
- self.name = "gl_SPARC_asm.py (from Mesa)"
- self.license = license.bsd_license_template % ( \
-"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
-(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
-
-
- def printRealHeader(self):
- print '#ifdef __arch64__'
- print '#define GL_OFF(N)\t((N) * 8)'
- print '#define GL_LL\t\tldx'
- print '#define GL_TIE_LD(SYM)\t%tie_ldx(SYM)'
- print '#define GL_STACK_SIZE\t128'
- print '#else'
- print '#define GL_OFF(N)\t((N) * 4)'
- print '#define GL_LL\t\tld'
- print '#define GL_TIE_LD(SYM)\t%tie_ld(SYM)'
- print '#define GL_STACK_SIZE\t64'
- print '#endif'
- print ''
- print '#define GLOBL_FN(x) .globl x ; .type x, @function'
- print '#define HIDDEN(x) .hidden x'
- print ''
- print '\t.register %g2, #scratch'
- print '\t.register %g3, #scratch'
- print ''
- print '\t.text'
- print ''
- print '\tGLOBL_FN(__glapi_sparc_icache_flush)'
- print '\tHIDDEN(__glapi_sparc_icache_flush)'
- print '\t.type\t__glapi_sparc_icache_flush, @function'
- print '__glapi_sparc_icache_flush: /* %o0 = insn_addr */'
- print '\tflush\t%o0'
- print '\tretl'
- print '\t nop'
- print ''
- print '\t.align\t32'
- print ''
- print '\t.type\t__glapi_sparc_get_pc, @function'
- print '__glapi_sparc_get_pc:'
- print '\tretl'
- print '\t add\t%o7, %g2, %g2'
- print '\t.size\t__glapi_sparc_get_pc, .-__glapi_sparc_get_pc'
- print ''
- print '#ifdef GLX_USE_TLS'
- print ''
- print '\tGLOBL_FN(__glapi_sparc_get_dispatch)'
- print '\tHIDDEN(__glapi_sparc_get_dispatch)'
- print '__glapi_sparc_get_dispatch:'
- print '\tmov\t%o7, %g1'
- print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2'
- print '\tcall\t__glapi_sparc_get_pc'
- print '\tadd\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2'
- print '\tmov\t%g1, %o7'
- print '\tsethi\t%tie_hi22(_glapi_tls_Dispatch), %g1'
- print '\tadd\t%g1, %tie_lo10(_glapi_tls_Dispatch), %g1'
- print '\tGL_LL\t[%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)'
- print '\tretl'
- print '\t mov\t%g2, %o0'
- print ''
- print '\t.data'
- print '\t.align\t32'
- print ''
- print '\t/* --> sethi %hi(_glapi_tls_Dispatch), %g1 */'
- print '\t/* --> or %g1, %lo(_glapi_tls_Dispatch), %g1 */'
- print '\tGLOBL_FN(__glapi_sparc_tls_stub)'
- print '\tHIDDEN(__glapi_sparc_tls_stub)'
- print '__glapi_sparc_tls_stub: /* Call offset in %g3 */'
- print '\tmov\t%o7, %g1'
- print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2'
- print '\tcall\t__glapi_sparc_get_pc'
- print '\tadd\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2'
- print '\tmov\t%g1, %o7'
- print '\tsrl\t%g3, 10, %g3'
- print '\tsethi\t%tie_hi22(_glapi_tls_Dispatch), %g1'
- print '\tadd\t%g1, %tie_lo10(_glapi_tls_Dispatch), %g1'
- print '\tGL_LL\t[%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)'
- print '\tGL_LL\t[%g7+%g2], %g1'
- print '\tGL_LL\t[%g1 + %g3], %g1'
- print '\tjmp\t%g1'
- print '\t nop'
- print '\t.size\t__glapi_sparc_tls_stub, .-__glapi_sparc_tls_stub'
- print ''
- print '#define GL_STUB(fn, off)\t\t\t\t\\'
- print '\tGLOBL_FN(fn);\t\t\t\t\t\\'
- print 'fn:\tba\t__glapi_sparc_tls_stub;\t\t\t\\'
- print '\t sethi\tGL_OFF(off), %g3;\t\t\t\\'
- print '\t.size\tfn,.-fn;'
- print ''
- print '#elif defined(PTHREADS)'
- print ''
- print '\t/* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */'
- print '\t/* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */'
- print '\t/* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */'
- print '\t/* 64-bit 0x0c --> sllx %g1, 32, %g1 */'
- print '\t/* 64-bit 0x10 --> add %g1, %g2, %g1 */'
- print '\t/* 64-bit 0x14 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */'
- print ''
- print '\t/* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */'
- print '\t/* 32-bit 0x04 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */'
- print ''
- print '\t.data'
- print '\t.align\t32'
- print ''
- print '\tGLOBL_FN(__glapi_sparc_pthread_stub)'
- print '\tHIDDEN(__glapi_sparc_pthread_stub)'
- print '__glapi_sparc_pthread_stub: /* Call offset in %g3 */'
- print '\tmov\t%o7, %g1'
- print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2'
- print '\tcall\t__glapi_sparc_get_pc'
- print '\t add\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2'
- print '\tmov\t%g1, %o7'
- print '\tsethi\t%hi(_glapi_Dispatch), %g1'
- print '\tor\t%g1, %lo(_glapi_Dispatch), %g1'
- print '\tsrl\t%g3, 10, %g3'
- print '\tGL_LL\t[%g2+%g1], %g2'
- print '\tGL_LL\t[%g2], %g1'
- print '\tcmp\t%g1, 0'
- print '\tbe\t2f'
- print '\t nop'
- print '1:\tGL_LL\t[%g1 + %g3], %g1'
- print '\tjmp\t%g1'
- print '\t nop'
- print '2:\tsave\t%sp, GL_STACK_SIZE, %sp'
- print '\tmov\t%g3, %l0'
- print '\tcall\t_glapi_get_dispatch'
- print '\t nop'
- print '\tmov\t%o0, %g1'
- print '\tmov\t%l0, %g3'
- print '\tba\t1b'
- print '\t restore %g0, %g0, %g0'
- print '\t.size\t__glapi_sparc_pthread_stub, .-__glapi_sparc_pthread_stub'
- print ''
- print '#define GL_STUB(fn, off)\t\t\t\\'
- print '\tGLOBL_FN(fn);\t\t\t\t\\'
- print 'fn:\tba\t__glapi_sparc_pthread_stub;\t\\'
- print '\t sethi\tGL_OFF(off), %g3;\t\t\\'
- print '\t.size\tfn,.-fn;'
- print ''
- print '#else /* Non-threaded version. */'
- print ''
- print '\t.type __glapi_sparc_nothread_stub, @function'
- print '__glapi_sparc_nothread_stub: /* Call offset in %g3 */'
- print '\tmov\t%o7, %g1'
- print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2'
- print '\tcall\t__glapi_sparc_get_pc'
- print '\t add\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2'
- print '\tmov\t%g1, %o7'
- print '\tsrl\t%g3, 10, %g3'
- print '\tsethi\t%hi(_glapi_Dispatch), %g1'
- print '\tor\t%g1, %lo(_glapi_Dispatch), %g1'
- print '\tGL_LL\t[%g2+%g1], %g2'
- print '\tGL_LL\t[%g2], %g1'
- print '\tGL_LL\t[%g1 + %g3], %g1'
- print '\tjmp\t%g1'
- print '\t nop'
- print '\t.size\t__glapi_sparc_nothread_stub, .-__glapi_sparc_nothread_stub'
- print ''
- print '#define GL_STUB(fn, off)\t\t\t\\'
- print '\tGLOBL_FN(fn);\t\t\t\t\\'
- print 'fn:\tba\t__glapi_sparc_nothread_stub;\t\\'
- print '\t sethi\tGL_OFF(off), %g3;\t\t\\'
- print '\t.size\tfn,.-fn;'
- print ''
- print '#endif'
- print ''
- print '#define GL_STUB_ALIAS(fn, alias) \\'
- print ' .globl fn; \\'
- print ' .set fn, alias'
- print ''
- print '\t.text'
- print '\t.align\t32'
- print ''
- print '\t.globl\tgl_dispatch_functions_start'
- print '\tHIDDEN(gl_dispatch_functions_start)'
- print 'gl_dispatch_functions_start:'
- print ''
- return
-
- def printRealFooter(self):
- print ''
- print '\t.globl\tgl_dispatch_functions_end'
- print '\tHIDDEN(gl_dispatch_functions_end)'
- print 'gl_dispatch_functions_end:'
- return
-
- def printBody(self, api):
- for f in api.functionIterateByOffset():
- name = f.dispatch_name()
-
- print '\tGL_STUB(gl%s, %d)' % (name, f.offset)
-
- if not f.is_static_entry_point(f.name):
- print '\tHIDDEN(gl%s)' % (name)
-
- for f in api.functionIterateByOffset():
- name = f.dispatch_name()
-
- if f.is_static_entry_point(f.name):
- for n in f.entry_points:
- if n != f.name:
- text = '\tGL_STUB_ALIAS(gl%s, gl%s)' % (n, f.name)
-
- if f.has_different_protocol(n):
- print '#ifndef GLX_INDIRECT_RENDERING'
- print text
- print '#endif'
- else:
- print text
-
- return
-
-
-def show_usage():
- print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0]
- sys.exit(1)
-
-if __name__ == '__main__':
- file_name = "gl_API.xml"
- mode = "generic"
-
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "m:f:")
- except Exception,e:
- show_usage()
-
- for (arg,val) in args:
- if arg == '-m':
- mode = val
- elif arg == "-f":
- file_name = val
-
- if mode == "generic":
- printer = PrintGenericStubs()
- else:
- print "ERROR: Invalid mode \"%s\" specified." % mode
- show_usage()
-
- api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory())
- printer.Print(api)
+#!/usr/bin/env python + +# (C) Copyright IBM Corporation 2004 +# All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, and/or sell copies of the Software, and to permit persons to whom +# the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# Authors: +# Ian Romanick <idr@us.ibm.com> + +import license +import gl_XML, glX_XML +import sys, getopt + +class PrintGenericStubs(gl_XML.gl_print_base): + def __init__(self): + gl_XML.gl_print_base.__init__(self) + self.name = "gl_SPARC_asm.py (from Mesa)" + self.license = license.bsd_license_template % ( \ +"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved. +(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM") + + + def printRealHeader(self): + print '#ifdef __arch64__' + print '#define GL_OFF(N)\t((N) * 8)' + print '#define GL_LL\t\tldx' + print '#define GL_TIE_LD(SYM)\t%tie_ldx(SYM)' + print '#define GL_STACK_SIZE\t128' + print '#else' + print '#define GL_OFF(N)\t((N) * 4)' + print '#define GL_LL\t\tld' + print '#define GL_TIE_LD(SYM)\t%tie_ld(SYM)' + print '#define GL_STACK_SIZE\t64' + print '#endif' + print '' + print '#define GLOBL_FN(x) .globl x ; .type x, @function' + print '#define HIDDEN(x) .hidden x' + print '' + print '\t.register %g2, #scratch' + print '\t.register %g3, #scratch' + print '' + print '\t.text' + print '' + print '\tGLOBL_FN(__glapi_sparc_icache_flush)' + print '\tHIDDEN(__glapi_sparc_icache_flush)' + print '\t.type\t__glapi_sparc_icache_flush, @function' + print '__glapi_sparc_icache_flush: /* %o0 = insn_addr */' + print '\tflush\t%o0' + print '\tretl' + print '\t nop' + print '' + print '\t.align\t32' + print '' + print '\t.type\t__glapi_sparc_get_pc, @function' + print '__glapi_sparc_get_pc:' + print '\tretl' + print '\t add\t%o7, %g2, %g2' + print '\t.size\t__glapi_sparc_get_pc, .-__glapi_sparc_get_pc' + print '' + print '#ifdef GLX_USE_TLS' + print '' + print '\tGLOBL_FN(__glapi_sparc_get_dispatch)' + print '\tHIDDEN(__glapi_sparc_get_dispatch)' + print '__glapi_sparc_get_dispatch:' + print '\tmov\t%o7, %g1' + print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' + print '\tcall\t__glapi_sparc_get_pc' + print '\tadd\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' + print '\tmov\t%g1, %o7' + print '\tsethi\t%tie_hi22(_glapi_tls_Dispatch), %g1' + print '\tadd\t%g1, %tie_lo10(_glapi_tls_Dispatch), %g1' + print '\tGL_LL\t[%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)' + print '\tretl' + print '\t mov\t%g2, %o0' + print '' + print '\t.data' + print '\t.align\t32' + print '' + print '\t/* --> sethi %hi(_glapi_tls_Dispatch), %g1 */' + print '\t/* --> or %g1, %lo(_glapi_tls_Dispatch), %g1 */' + print '\tGLOBL_FN(__glapi_sparc_tls_stub)' + print '\tHIDDEN(__glapi_sparc_tls_stub)' + print '__glapi_sparc_tls_stub: /* Call offset in %g3 */' + print '\tmov\t%o7, %g1' + print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' + print '\tcall\t__glapi_sparc_get_pc' + print '\tadd\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' + print '\tmov\t%g1, %o7' + print '\tsrl\t%g3, 10, %g3' + print '\tsethi\t%tie_hi22(_glapi_tls_Dispatch), %g1' + print '\tadd\t%g1, %tie_lo10(_glapi_tls_Dispatch), %g1' + print '\tGL_LL\t[%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)' + print '\tGL_LL\t[%g7+%g2], %g1' + print '\tGL_LL\t[%g1 + %g3], %g1' + print '\tjmp\t%g1' + print '\t nop' + print '\t.size\t__glapi_sparc_tls_stub, .-__glapi_sparc_tls_stub' + print '' + print '#define GL_STUB(fn, off)\t\t\t\t\\' + print '\tGLOBL_FN(fn);\t\t\t\t\t\\' + print 'fn:\tba\t__glapi_sparc_tls_stub;\t\t\t\\' + print '\t sethi\tGL_OFF(off), %g3;\t\t\t\\' + print '\t.size\tfn,.-fn;' + print '' + print '#elif defined(PTHREADS)' + print '' + print '\t/* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */' + print '\t/* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */' + print '\t/* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */' + print '\t/* 64-bit 0x0c --> sllx %g1, 32, %g1 */' + print '\t/* 64-bit 0x10 --> add %g1, %g2, %g1 */' + print '\t/* 64-bit 0x14 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */' + print '' + print '\t/* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */' + print '\t/* 32-bit 0x04 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */' + print '' + print '\t.data' + print '\t.align\t32' + print '' + print '\tGLOBL_FN(__glapi_sparc_pthread_stub)' + print '\tHIDDEN(__glapi_sparc_pthread_stub)' + print '__glapi_sparc_pthread_stub: /* Call offset in %g3 */' + print '\tmov\t%o7, %g1' + print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' + print '\tcall\t__glapi_sparc_get_pc' + print '\t add\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' + print '\tmov\t%g1, %o7' + print '\tsethi\t%hi(_glapi_Dispatch), %g1' + print '\tor\t%g1, %lo(_glapi_Dispatch), %g1' + print '\tsrl\t%g3, 10, %g3' + print '\tGL_LL\t[%g2+%g1], %g2' + print '\tGL_LL\t[%g2], %g1' + print '\tcmp\t%g1, 0' + print '\tbe\t2f' + print '\t nop' + print '1:\tGL_LL\t[%g1 + %g3], %g1' + print '\tjmp\t%g1' + print '\t nop' + print '2:\tsave\t%sp, GL_STACK_SIZE, %sp' + print '\tmov\t%g3, %l0' + print '\tcall\t_glapi_get_dispatch' + print '\t nop' + print '\tmov\t%o0, %g1' + print '\tmov\t%l0, %g3' + print '\tba\t1b' + print '\t restore %g0, %g0, %g0' + print '\t.size\t__glapi_sparc_pthread_stub, .-__glapi_sparc_pthread_stub' + print '' + print '#define GL_STUB(fn, off)\t\t\t\\' + print '\tGLOBL_FN(fn);\t\t\t\t\\' + print 'fn:\tba\t__glapi_sparc_pthread_stub;\t\\' + print '\t sethi\tGL_OFF(off), %g3;\t\t\\' + print '\t.size\tfn,.-fn;' + print '' + print '#else /* Non-threaded version. */' + print '' + print '\t.type __glapi_sparc_nothread_stub, @function' + print '__glapi_sparc_nothread_stub: /* Call offset in %g3 */' + print '\tmov\t%o7, %g1' + print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' + print '\tcall\t__glapi_sparc_get_pc' + print '\t add\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' + print '\tmov\t%g1, %o7' + print '\tsrl\t%g3, 10, %g3' + print '\tsethi\t%hi(_glapi_Dispatch), %g1' + print '\tor\t%g1, %lo(_glapi_Dispatch), %g1' + print '\tGL_LL\t[%g2+%g1], %g2' + print '\tGL_LL\t[%g2], %g1' + print '\tGL_LL\t[%g1 + %g3], %g1' + print '\tjmp\t%g1' + print '\t nop' + print '\t.size\t__glapi_sparc_nothread_stub, .-__glapi_sparc_nothread_stub' + print '' + print '#define GL_STUB(fn, off)\t\t\t\\' + print '\tGLOBL_FN(fn);\t\t\t\t\\' + print 'fn:\tba\t__glapi_sparc_nothread_stub;\t\\' + print '\t sethi\tGL_OFF(off), %g3;\t\t\\' + print '\t.size\tfn,.-fn;' + print '' + print '#endif' + print '' + print '#define GL_STUB_ALIAS(fn, alias) \\' + print ' .globl fn; \\' + print ' .set fn, alias' + print '' + print '\t.text' + print '\t.align\t32' + print '' + print '\t.globl\tgl_dispatch_functions_start' + print '\tHIDDEN(gl_dispatch_functions_start)' + print 'gl_dispatch_functions_start:' + print '' + return + + def printRealFooter(self): + print '' + print '\t.globl\tgl_dispatch_functions_end' + print '\tHIDDEN(gl_dispatch_functions_end)' + print 'gl_dispatch_functions_end:' + return + + def printBody(self, api): + for f in api.functionIterateByOffset(): + name = f.dispatch_name() + + print '\tGL_STUB(gl%s, %d)' % (name, f.offset) + + if not f.is_static_entry_point(f.name): + print '\tHIDDEN(gl%s)' % (name) + + for f in api.functionIterateByOffset(): + name = f.dispatch_name() + + if f.is_static_entry_point(f.name): + for n in f.entry_points: + if n != f.name: + text = '\tGL_STUB_ALIAS(gl%s, gl%s)' % (n, f.name) + + if f.has_different_protocol(n): + print '#ifndef GLX_INDIRECT_RENDERING' + print text + print '#endif' + else: + print text + + return + + +def show_usage(): + print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0] + sys.exit(1) + +if __name__ == '__main__': + file_name = "gl_API.xml" + mode = "generic" + + try: + (args, trail) = getopt.getopt(sys.argv[1:], "m:f:") + except Exception,e: + show_usage() + + for (arg,val) in args: + if arg == '-m': + mode = val + elif arg == "-f": + file_name = val + + if mode == "generic": + printer = PrintGenericStubs() + else: + print "ERROR: Invalid mode \"%s\" specified." % mode + show_usage() + + api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) + printer.Print(api) diff --git a/mesalib/src/mapi/glapi/gen/gl_procs.py b/mesalib/src/mapi/glapi/gen/gl_procs.py index f1522baec..a9ba48297 100644 --- a/mesalib/src/mapi/glapi/gen/gl_procs.py +++ b/mesalib/src/mapi/glapi/gen/gl_procs.py @@ -1,215 +1,215 @@ -#!/usr/bin/env python
-
-# (C) Copyright IBM Corporation 2004, 2005
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#
-# Authors:
-# Ian Romanick <idr@us.ibm.com>
-
-import license
-import gl_XML, glX_XML
-import sys, getopt
-
-class PrintGlProcs(gl_XML.gl_print_base):
- def __init__(self, long_strings, es=False):
- gl_XML.gl_print_base.__init__(self)
-
- self.es = es
- self.long_strings = long_strings
- self.name = "gl_procs.py (from Mesa)"
- self.license = license.bsd_license_template % ( \
-"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
-(C) Copyright IBM Corporation 2004, 2006""", "BRIAN PAUL, IBM")
-
-
- def printRealHeader(self):
- print """
-/* This file is only included by glapi.c and is used for
- * the GetProcAddress() function
- */
-
-typedef struct {
- GLint Name_offset;
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
- _glapi_proc Address;
-#endif
- GLuint Offset;
-} glprocs_table_t;
-
-#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o }
-#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o }
-#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o }
-#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o }
-#endif
-
-"""
- return
-
- def printRealFooter(self):
- print ''
- print '#undef NAME_FUNC_OFFSET'
- return
-
- def printFunctionString(self, name):
- if self.long_strings:
- print ' "gl%s\\0"' % (name)
- else:
- print " 'g','l',",
- for c in name:
- print "'%s'," % (c),
-
- print "'\\0',"
-
-
- def printBody(self, api):
- print ''
- if self.long_strings:
- print 'static const char gl_string_table[] ='
- else:
- print 'static const char gl_string_table[] = {'
-
- base_offset = 0
- table = []
- for func in api.functionIterateByOffset():
- name = func.dispatch_name()
- self.printFunctionString(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.
-
- base_offset += len(func.name) + 3
-
-
- for func in api.functionIterateByOffset():
- for n in func.entry_points:
- if n != func.name:
- name = func.dispatch_name()
- self.printFunctionString( n )
-
- 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.offset))
- else:
- table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.offset))
-
- base_offset += len(n) + 3
-
-
- if self.long_strings:
- print ' ;'
- else:
- print '};'
-
- print ''
- print ''
- print "#ifdef USE_MGL_NAMESPACE"
- for func in api.functionIterateByOffset():
- for n in func.entry_points:
- if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)):
- print '#define gl_dispatch_stub_%u mgl_dispatch_stub_%u' % (func.offset, func.offset)
- break
- print "#endif /* USE_MGL_NAMESPACE */"
- print ''
- print ''
- print '#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)'
- for func in api.functionIterateByOffset():
- for n in func.entry_points:
- if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)):
- print '%s GLAPIENTRY gl_dispatch_stub_%u(%s);' % (func.return_type, func.offset, func.get_parameter_string())
- break
-
- if self.es:
- categories = {}
- for func in api.functionIterateByOffset():
- for n in func.entry_points:
- cat, num = api.get_category_for_name(n)
- if (cat.startswith("es") or cat.startswith("GL_OES")):
- if not categories.has_key(cat):
- categories[cat] = []
- proto = 'GLAPI %s GLAPIENTRY %s(%s);' \
- % (func.return_type, "gl" + n, func.get_parameter_string(n))
- categories[cat].append(proto)
- if categories:
- print ''
- print '/* OpenGL ES specific prototypes */'
- print ''
- keys = categories.keys()
- keys.sort()
- for key in keys:
- print '/* category %s */' % key
- print "\n".join(categories[key])
- print ''
-
- print '#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */'
-
- print ''
- print 'static const glprocs_table_t static_functions[] = {'
-
- for info in table:
- print ' NAME_FUNC_OFFSET(%5u, %s, %s, %s, %d),' % info
-
- print ' NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)'
- print '};'
- return
-
-
-def show_usage():
- print "Usage: %s [-f input_file_name] [-m mode] [-c]" % sys.argv[0]
- print "-c Enable compatibility with OpenGL ES."
- print "-m mode mode can be one of:"
- print " long - Create code for compilers that can handle very"
- print " long string constants. (default)"
- print " short - Create code for compilers that can only handle"
- print " ANSI C89 string constants."
- sys.exit(1)
-
-if __name__ == '__main__':
- file_name = "gl_API.xml"
-
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c")
- except Exception,e:
- show_usage()
-
- long_string = 1
- es = False
- for (arg,val) in args:
- if arg == "-f":
- file_name = val
- elif arg == "-m":
- if val == "short":
- long_string = 0
- elif val == "long":
- long_string = 1
- else:
- show_usage()
- elif arg == "-c":
- es = True
-
- api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory())
- printer = PrintGlProcs(long_string, es)
- printer.Print(api)
+#!/usr/bin/env python + +# (C) Copyright IBM Corporation 2004, 2005 +# All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, and/or sell copies of the Software, and to permit persons to whom +# the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# Authors: +# Ian Romanick <idr@us.ibm.com> + +import license +import gl_XML, glX_XML +import sys, getopt + +class PrintGlProcs(gl_XML.gl_print_base): + def __init__(self, long_strings, es=False): + gl_XML.gl_print_base.__init__(self) + + self.es = es + self.long_strings = long_strings + self.name = "gl_procs.py (from Mesa)" + self.license = license.bsd_license_template % ( \ +"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. +(C) Copyright IBM Corporation 2004, 2006""", "BRIAN PAUL, IBM") + + + def printRealHeader(self): + print """ +/* This file is only included by glapi.c and is used for + * the GetProcAddress() function + */ + +typedef struct { + GLint Name_offset; +#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) + _glapi_proc Address; +#endif + GLuint Offset; +} glprocs_table_t; + +#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o } +#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o } +#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o } +#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o } +#endif + +""" + return + + def printRealFooter(self): + print '' + print '#undef NAME_FUNC_OFFSET' + return + + def printFunctionString(self, name): + if self.long_strings: + print ' "gl%s\\0"' % (name) + else: + print " 'g','l',", + for c in name: + print "'%s'," % (c), + + print "'\\0'," + + + def printBody(self, api): + print '' + if self.long_strings: + print 'static const char gl_string_table[] =' + else: + print 'static const char gl_string_table[] = {' + + base_offset = 0 + table = [] + for func in api.functionIterateByOffset(): + name = func.dispatch_name() + self.printFunctionString(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. + + base_offset += len(func.name) + 3 + + + for func in api.functionIterateByOffset(): + for n in func.entry_points: + if n != func.name: + name = func.dispatch_name() + self.printFunctionString( n ) + + 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.offset)) + else: + table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.offset)) + + base_offset += len(n) + 3 + + + if self.long_strings: + print ' ;' + else: + print '};' + + print '' + print '' + print "#ifdef USE_MGL_NAMESPACE" + for func in api.functionIterateByOffset(): + for n in func.entry_points: + if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)): + print '#define gl_dispatch_stub_%u mgl_dispatch_stub_%u' % (func.offset, func.offset) + break + print "#endif /* USE_MGL_NAMESPACE */" + print '' + print '' + print '#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)' + for func in api.functionIterateByOffset(): + for n in func.entry_points: + if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)): + print '%s GLAPIENTRY gl_dispatch_stub_%u(%s);' % (func.return_type, func.offset, func.get_parameter_string()) + break + + if self.es: + categories = {} + for func in api.functionIterateByOffset(): + for n in func.entry_points: + cat, num = api.get_category_for_name(n) + if (cat.startswith("es") or cat.startswith("GL_OES")): + if not categories.has_key(cat): + categories[cat] = [] + proto = 'GLAPI %s GLAPIENTRY %s(%s);' \ + % (func.return_type, "gl" + n, func.get_parameter_string(n)) + categories[cat].append(proto) + if categories: + print '' + print '/* OpenGL ES specific prototypes */' + print '' + keys = categories.keys() + keys.sort() + for key in keys: + print '/* category %s */' % key + print "\n".join(categories[key]) + print '' + + print '#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */' + + print '' + print 'static const glprocs_table_t static_functions[] = {' + + for info in table: + print ' NAME_FUNC_OFFSET(%5u, %s, %s, %s, %d),' % info + + print ' NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)' + print '};' + return + + +def show_usage(): + print "Usage: %s [-f input_file_name] [-m mode] [-c]" % sys.argv[0] + print "-c Enable compatibility with OpenGL ES." + print "-m mode mode can be one of:" + print " long - Create code for compilers that can handle very" + print " long string constants. (default)" + print " short - Create code for compilers that can only handle" + print " ANSI C89 string constants." + sys.exit(1) + +if __name__ == '__main__': + file_name = "gl_API.xml" + + try: + (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c") + except Exception,e: + show_usage() + + long_string = 1 + es = False + for (arg,val) in args: + if arg == "-f": + file_name = val + elif arg == "-m": + if val == "short": + long_string = 0 + elif val == "long": + long_string = 1 + else: + show_usage() + elif arg == "-c": + es = True + + api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) + printer = PrintGlProcs(long_string, es) + printer.Print(api) diff --git a/mesalib/src/mapi/glapi/gen/next_available_offset.sh b/mesalib/src/mapi/glapi/gen/next_available_offset.sh index 20d45ec54..e7d6c2f4a 100644 --- a/mesalib/src/mapi/glapi/gen/next_available_offset.sh +++ b/mesalib/src/mapi/glapi/gen/next_available_offset.sh @@ -1,39 +1,39 @@ -#!/usr/bin/env bash
-#
-# (C) Copyright IBM Corporation 2004
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#
-# Authors:
-# Ian Romanick <idr@us.ibm.com>
-
-# Trivial shell script to search the API definition file and print out the
-# next numerically available API entry-point offset. This could probably
-# be made smarter, but it would be better to use the existin Python
-# framework to do that. This is just a quick-and-dirty hack.
-
-num=$(grep 'offset="' gl_API.xml |\
- sed 's/.\+ offset="//g;s/".*$//g' |\
- grep -v '?' |\
- sort -rn |\
- head -1)
-
-echo $((num + 1))
+#!/usr/bin/env bash +# +# (C) Copyright IBM Corporation 2004 +# All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, and/or sell copies of the Software, and to permit persons to whom +# the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# Authors: +# Ian Romanick <idr@us.ibm.com> + +# Trivial shell script to search the API definition file and print out the +# next numerically available API entry-point offset. This could probably +# be made smarter, but it would be better to use the existin Python +# framework to do that. This is just a quick-and-dirty hack. + +num=$(grep 'offset="' gl_API.xml |\ + sed 's/.\+ offset="//g;s/".*$//g' |\ + grep -v '?' |\ + sort -rn |\ + head -1) + +echo $((num + 1)) |