summaryrefslogtreecommitdiffstats
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_get_texture_sub_image.xml40
-rw-r--r--src/mapi/glapi/gen/ARB_shader_subroutine.xml84
-rw-r--r--src/mapi/glapi/gen/ARB_tessellation_shader.xml62
-rw-r--r--src/mapi/glapi/gen/Makefile.am2
-rw-r--r--src/mapi/glapi/gen/apiexec.py11
-rw-r--r--src/mapi/glapi/gen/glX_proto_recv.py4
-rw-r--r--src/mapi/glapi/gen/gl_API.xml12
-rw-r--r--src/mapi/glapi/gen/gl_enums.py3
8 files changed, 213 insertions, 5 deletions
diff --git a/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml b/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml
new file mode 100644
index 00000000000..14e1c20b9d5
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- This is included by gl_and_es_API.xml. Could be moved to gl_API.xml. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_get_texture_sub_image" number="165">
+
+ <function name="GetTextureSubImage" offset="assign">
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="pixels" type="GLvoid *"/>
+ </function>
+
+ <function name="GetCompressedTextureSubImage" offset="assign">
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="pixels" type="GLvoid *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/ARB_shader_subroutine.xml b/src/mapi/glapi/gen/ARB_shader_subroutine.xml
new file mode 100644
index 00000000000..04b75cb8f59
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_shader_subroutine.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_shader_subroutine" number="90">
+
+ <function name="GetSubroutineUniformLocation" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="name" type="const GLchar *"/>
+ <return type="GLint"/>
+ </function>
+
+ <function name="GetSubroutineIndex" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="name" type="const GLchar *"/>
+ <return type="GLuint"/>
+ </function>
+
+ <function name="GetActiveSubroutineUniformiv" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="values" type="GLint *" output="true"/>
+ </function>
+
+ <function name="GetActiveSubroutineUniformName" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufsize" type="GLsizei"/>
+ <param name="length" type="GLsizei *" output="true"/>
+ <param name="name" type="GLchar *" output="true"/>
+ </function>
+
+ <function name="GetActiveSubroutineName" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufsize" type="GLsizei"/>
+ <param name="length" type="GLsizei *" output="true"/>
+ <param name="name" type="GLchar *" output="true"/>
+ </function>
+
+ <function name="UniformSubroutinesuiv" offset="assign">
+ <param name="shadertype" type="GLenum"/>
+ <param name="count" type="GLsizei"/>
+ <param name="indices" type="const GLuint *"/>
+ </function>
+
+ <function name="GetUniformSubroutineuiv" offset="assign">
+ <param name="shadertype" type="GLenum"/>
+ <param name="location" type="GLint"/>
+ <param name="params" type="GLuint *" output="true"/>
+ </function>
+
+ <function name="GetProgramStageiv" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="values" type="GLint *" output="true"/>
+ </function>
+
+ <enum name="ACTIVE_SUBROUTINES" value="0x8DE5"/>
+ <enum name="ACTIVE_SUBROUTINE_UNIFORMS" value="0x8DE6"/>
+ <enum name="ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS" value="0x8E47"/>
+ <enum name="ACTIVE_SUBROUTINE_MAX_LENGTH" value="0x8E48"/>
+ <enum name="ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH" value="0x8E49"/>
+
+ <enum name="MAX_SUBROUTINES" value="0x8DE7"/>
+ <enum name="MAX_SUBROUTINE_UNIFORM_LOCATIONS" value="0x8DE8"/>
+
+ <enum name="NUM_COMPATIBLE_SUBROUTINES" value="0x8E4A"/>
+ <enum name="COMPATIBLE_SUBROUTINES" value="0x8E4B"/>
+
+ <!-- UNIFORM_SIZE, UNIFORM_NAME_LENGTH already in GL3.1 -->
+
+</category>
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/ARB_tessellation_shader.xml b/src/mapi/glapi/gen/ARB_tessellation_shader.xml
new file mode 100644
index 00000000000..16a213933ef
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_tessellation_shader.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+
+<category name="GL_ARB_tessellation_shader" number="91">
+
+ <!--<enum value="0" name="FALSE"/>
+ <enum value="1" name="TRUE"/>
+ <enum value="0x0004" name="TRIANGLES"/>
+ <enum value="0x0007" name="QUADS"/>
+ <enum value="0x0202" name="EQUAL"/>
+ <enum value="0x0900" name="CW"/>
+ <enum value="0x0901" name="CCW"/>-->
+
+ <enum value="0x000E" name="PATCHES"/>
+ <enum value="0x84F0" name="UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+ <enum value="0x84F1" name="UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+ <enum value="0x886C" name="MAX_TESS_CONTROL_INPUT_COMPONENTS"/>
+ <enum value="0x886D" name="MAX_TESS_EVALUATION_INPUT_COMPONENTS"/>
+ <enum value="0x8E1E" name="MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+ <enum value="0x8E1F" name="MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+ <enum value="0x8E72" name="PATCH_VERTICES"/>
+ <enum value="0x8E73" name="PATCH_DEFAULT_INNER_LEVEL"/>
+ <enum value="0x8E74" name="PATCH_DEFAULT_OUTER_LEVEL"/>
+ <enum value="0x8E75" name="TESS_CONTROL_OUTPUT_VERTICES"/>
+ <enum value="0x8E76" name="TESS_GEN_MODE"/>
+ <enum value="0x8E77" name="TESS_GEN_SPACING"/>
+ <enum value="0x8E78" name="TESS_GEN_VERTEX_ORDER"/>
+ <enum value="0x8E79" name="TESS_GEN_POINT_MODE"/>
+ <enum value="0x8E7A" name="ISOLINES"/>
+ <enum value="0x8E7B" name="FRACTIONAL_ODD"/>
+ <enum value="0x8E7C" name="FRACTIONAL_EVEN"/>
+ <enum value="0x8E7D" name="MAX_PATCH_VERTICES"/>
+ <enum value="0x8E7E" name="MAX_TESS_GEN_LEVEL"/>
+ <enum value="0x8E7F" name="MAX_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+ <enum value="0x8E80" name="MAX_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+ <enum value="0x8E81" name="MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS"/>
+ <enum value="0x8E82" name="MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS"/>
+ <enum value="0x8E83" name="MAX_TESS_CONTROL_OUTPUT_COMPONENTS"/>
+ <enum value="0x8E84" name="MAX_TESS_PATCH_COMPONENTS"/>
+ <enum value="0x8E85" name="MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS"/>
+ <enum value="0x8E86" name="MAX_TESS_EVALUATION_OUTPUT_COMPONENTS"/>
+ <enum value="0x8E87" name="TESS_EVALUATION_SHADER"/>
+ <enum value="0x8E88" name="TESS_CONTROL_SHADER"/>
+ <enum value="0x8E89" name="MAX_TESS_CONTROL_UNIFORM_BLOCKS"/>
+ <enum value="0x8E8A" name="MAX_TESS_EVALUATION_UNIFORM_BLOCKS"/>
+
+ <function name="PatchParameteri" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="value" type="GLint"/>
+ </function>
+ <function name="PatchParameterfv" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="values" type="const GLfloat *"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 5b163b02e00..7d9d1a61215 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -135,6 +135,7 @@ API_XML = \
ARB_framebuffer_object.xml \
ARB_geometry_shader4.xml \
ARB_get_program_binary.xml \
+ ARB_get_texture_sub_image.xml \
ARB_gpu_shader_fp64.xml \
ARB_gpu_shader5.xml \
ARB_instanced_arrays.xml \
@@ -151,6 +152,7 @@ API_XML = \
ARB_separate_shader_objects.xml \
ARB_shader_atomic_counters.xml \
ARB_shader_image_load_store.xml \
+ ARB_shader_subroutine.xml \
ARB_sync.xml \
ARB_texture_barrier.xml \
ARB_texture_buffer_object.xml \
diff --git a/src/mapi/glapi/gen/apiexec.py b/src/mapi/glapi/gen/apiexec.py
index b623b44beeb..3a0eb1869a8 100644
--- a/src/mapi/glapi/gen/apiexec.py
+++ b/src/mapi/glapi/gen/apiexec.py
@@ -74,6 +74,17 @@ functions = {
# GL_ARB_geometry_shader4, so OpenGL 3.2 is required.
"FramebufferTexture": exec_info(core=32),
+ # OpenGL 4.0 / GL_ARB_shader_subroutines. Mesa only exposes this
+ # extension with core profile.
+ "GetSubroutineUniformLocation": exec_info(core=31),
+ "GetSubroutineIndex": exec_info(core=31),
+ "GetActiveSubroutineUniformiv": exec_info(core=31),
+ "GetActiveSubroutineUniformName": exec_info(core=31),
+ "GetActiveSubroutineName": exec_info(core=31),
+ "UniformSubroutinesuiv": exec_info(core=31),
+ "GetUniformSubroutineuiv": exec_info(core=31),
+ "GetProgramStageiv": exec_info(core=31),
+
# OpenGL 4.0 / GL_ARB_gpu_shader_fp64. The extension spec says:
#
# "OpenGL 3.2 and GLSL 1.50 are required."
diff --git a/src/mapi/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py
index da468dc5876..5d95f278a91 100644
--- a/src/mapi/glapi/gen/glX_proto_recv.py
+++ b/src/mapi/glapi/gen/glX_proto_recv.py
@@ -549,9 +549,9 @@ def main():
"""Main function."""
args = _parser()
- if args._mode == "dispatch_c":
+ if args.mode == "dispatch_c":
printer = PrintGlxDispatchFunctions(args.swap)
- elif args._mode == "dispatch_h":
+ elif args.mode == "dispatch_h":
printer = PrintGlxDispatch_h()
api = gl_XML.parse_GL_API(
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 2f330756f22..658efa485f6 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8072,7 +8072,13 @@
<xi:include href="ARB_vertex_type_2_10_10_10_rev.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<!-- ARB extensions #86...#93 -->
+<!-- ARB extensions #86...#89 -->
+
+<xi:include href="ARB_shader_subroutine.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<xi:include href="ARB_tessellation_shader.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- ARB extensions #92...#93 -->
<xi:include href="ARB_draw_indirect.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
@@ -8253,7 +8259,9 @@
<xi:include href="ARB_direct_state_access.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<!-- ARB extensions 165 - 166 -->
+<xi:include href="ARB_get_texture_sub_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- ARB extension 166 -->
<xi:include href="ARB_texture_barrier.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 955f27d0818..041c2f8ddb8 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -78,7 +78,7 @@ static int compar_nr( const int *a, enum_elt *b )
static char token_tmp[20];
-const char *_mesa_lookup_enum_by_nr( int nr )
+const char *_mesa_enum_to_string( int nr )
{
enum_elt *elt;
@@ -118,6 +118,7 @@ static const char *prim_names[PRIM_MAX+3] = {
"GL_LINE_STRIP_ADJACENCY",
"GL_TRIANGLES_ADJACENCY",
"GL_TRIANGLE_STRIP_ADJACENCY",
+ "GL_PATCHES",
"outside begin/end",
"unknown state"
};