[Mesa-dev] [PATCH 02/19] glapi: Add ARB_shader_subroutine functions and enums

Tapani tapani.palli at intel.com
Mon Jun 1 06:40:00 PDT 2015


You did not do changes I suggested but it looks to me that the comments 
are still valid.
(http://lists.freedesktop.org/archives/mesa-dev/2015-April/082523.html)

In a nutshell, parameters that get written to should have qualifier 
"output=true". It could be that it is not strictly required, however 
this pattern is followed by other xml files. Then there's one typo in 
enums "ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGT".


With these fixed;

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>


On 06/01/2015 04:34 AM, Dave Airlie wrote:
> From: Chris Forbes <chrisf at ijw.co.nz>
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>   src/mapi/glapi/gen/ARB_shader_subroutine.xml | 84 ++++++++++++++++++++++++++++
>   src/mapi/glapi/gen/Makefile.am               |  1 +
>   src/mapi/glapi/gen/gl_API.xml                |  6 +-
>   3 files changed, 90 insertions(+), 1 deletion(-)
>   create mode 100644 src/mapi/glapi/gen/ARB_shader_subroutine.xml
>
> 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 0000000..91784d5
> --- /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 *"/>
> +    </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 *"/>
> +        <param name="name" type="GLchar *"/>
> +    </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 *"/>
> +        <param name="name" type="GLchar *"/>
> +    </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 *"/>
> +    </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 *"/>
> +    </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_LENGT" 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/Makefile.am b/src/mapi/glapi/gen/Makefile.am
> index 3460257..29ec1ac 100644
> --- a/src/mapi/glapi/gen/Makefile.am
> +++ b/src/mapi/glapi/gen/Makefile.am
> @@ -150,6 +150,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/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index bd8db62..0c96480 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -8072,7 +8072,11 @@
>   
>   <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"/>
> +
> +<!-- ARB extensions #91...#93 -->
>   
>   <xi:include href="ARB_draw_indirect.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
>   



More information about the mesa-dev mailing list