[Mesa-dev] [PATCH 01/12] sso: Create extensions entry points

Ian Romanick idr at freedesktop.org
Fri May 24 16:27:59 PDT 2013


I'm finally getting off my lazy behind and reviewing this series.  I'll 
probably only be able to review one or two patches today, but I should 
be able to get through the rest shortly.

So far, it's just little stuff.

On 05/03/2013 10:44 AM, Gregory Hainaut wrote:
> Nothings implemented yet but glProgramUniform* which are mostly
> a copy/paste of the older function glUniform*
>
> I create dedicated pipelineobj.[ch] file that will contains function
> related to the "new" pipeline container object.
>
> V2: formatting improvement
>
> V3:
> * indentation fix
> * Update copyright
> * Add a comment on ProgramParameteri already present in another extension
> * Remove TODO, will be readded on correct patch
> ---
>   src/mapi/glapi/gen/ARB_separate_shader_objects.xml |  401 ++++++++++++++++++++
>   src/mapi/glapi/gen/Makefile.am                     |    1 +
>   src/mapi/glapi/gen/gl_API.xml                      |    6 +-
>   src/mapi/glapi/gen/gl_genexec.py                   |    1 +
>   src/mesa/main/extensions.c                         |    1 +
>   src/mesa/main/mtypes.h                             |    1 +
>   src/mesa/main/pipelineobj.c                        |  133 +++++++
>   src/mesa/main/pipelineobj.h                        |   74 ++++
>   src/mesa/main/shaderapi.c                          |    9 +
>   src/mesa/main/shaderapi.h                          |    3 +
>   src/mesa/main/uniforms.c                           |  400 +++++++++++++++++++
>   src/mesa/main/uniforms.h                           |   83 ++++
>   src/mesa/sources.mak                               |    1 +
>   13 files changed, 1113 insertions(+), 1 deletion(-)
>   create mode 100644 src/mapi/glapi/gen/ARB_separate_shader_objects.xml
>   create mode 100644 src/mesa/main/pipelineobj.c
>   create mode 100644 src/mesa/main/pipelineobj.h
>
> diff --git a/src/mapi/glapi/gen/ARB_separate_shader_objects.xml b/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
> new file mode 100644
> index 0000000..f996456
> --- /dev/null
> +++ b/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
> @@ -0,0 +1,401 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
> +
> +<!-- Note: no GLX protocol info yet. -->
> +
> +<OpenGLAPI>
> +   <category name="ARB_separate_shader_objects" number="97">
> +      <enum   name="ACTIVE_PROGRAM"                               value="0x8259"/>
> +      <enum   name="PROGRAM_PIPELINE_BINDING"                     value="0x825A"/>
> +      <enum   name="VERTEX_SHADER_BIT"                            value="0x00000001"/>
> +      <enum   name="FRAGMENT_SHADER_BIT"                          value="0x00000002"/>
> +      <enum   name="GEOMETRY_SHADER_BIT"                          value="0x00000004"/>
> +      <enum   name="TESS_CONTROL_SHADER_BIT"                      value="0x00000008"/>
> +      <enum   name="TESS_EVALUATION_SHADER_BIT"                   value="0x00000010"/>
> +      <enum   name="ALL_SHADER_BITS"                              value="0xFFFFFFFF"/>
> +      <enum   name="PROGRAM_SEPARABLE"                            value="0x8258"/>
> +
> +      <function name="UseProgramStages" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +         <param name="stages" type="GLbitfield" />
> +         <param name="program" type="GLuint" />
> +      </function>
> +      <function name="ActiveShaderProgram" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +         <param name="program" type="GLuint" />
> +      </function>
> +      <function name="CreateShaderProgramv" offset="assign">
> +         <param name="type" type="GLenum" />
> +         <param name="count" type="GLsizei" />
> +         <param name="strings" type="const GLchar * const *" />
> +         <return type="uint"/>
> +      </function>
> +      <function name="BindProgramPipeline" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +      </function>
> +      <function name="DeleteProgramPipelines" offset="assign">
> +         <param name="n" type="GLsizei" />
> +         <param name="pipelines" type="const GLuint *" />
> +      </function>
> +      <function name="GenProgramPipelines" offset="assign">
> +         <param name="n" type="GLsizei" />
> +         <param name="pipelines" type="GLuint *" />
> +      </function>
> +      <function name="IsProgramPipeline" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +         <return type="GLboolean"/>
> +      </function>
> +      <!-- Function already included on ARB_get_program_binary.xml. Keep a commented
> +      version here for completeness -->
> +      <!--
> +      <function name="ProgramParameteri" offset="assign" es2="3.0">
> +         <param name="program" type="GLuint"/>
> +         <param name="pname" type="GLenum"/>
> +         <param name="value" type="GLint"/>
> +      </function>
> +      -->
> +      <function name="GetProgramPipelineiv" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +         <param name="pname" type="GLenum" />
> +         <param name="params" type="GLint *" />
> +      </function>
> +      <function name="ProgramUniform1i" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLint" />
> +      </function>
> +      <function name="ProgramUniform2i" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLint" />
> +         <param name="y" type="GLint" />
> +      </function>
> +      <function name="ProgramUniform3i" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLint" />
> +         <param name="y" type="GLint" />
> +         <param name="z" type="GLint" />
> +      </function>
> +      <function name="ProgramUniform4i" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLint" />
> +         <param name="y" type="GLint" />
> +         <param name="z" type="GLint" />
> +         <param name="w" type="GLint" />
> +      </function>
> +      <function name="ProgramUniform1ui" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLuint" />
> +      </function>
> +      <function name="ProgramUniform2ui" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLuint" />
> +         <param name="y" type="GLuint" />
> +      </function>
> +      <function name="ProgramUniform3ui" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLuint" />
> +         <param name="y" type="GLuint" />
> +         <param name="z" type="GLuint" />
> +      </function>
> +      <function name="ProgramUniform4ui" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLuint" />
> +         <param name="y" type="GLuint" />
> +         <param name="z" type="GLuint" />
> +         <param name="w" type="GLuint" />
> +      </function>
> +      <function name="ProgramUniform1f" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLfloat" />
> +      </function>
> +      <function name="ProgramUniform2f" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLfloat" />
> +         <param name="y" type="GLfloat" />
> +      </function>
> +      <function name="ProgramUniform3f" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLfloat" />
> +         <param name="y" type="GLfloat" />
> +         <param name="z" type="GLfloat" />
> +      </function>
> +      <function name="ProgramUniform4f" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLfloat" />
> +         <param name="y" type="GLfloat" />
> +         <param name="z" type="GLfloat" />
> +         <param name="w" type="GLfloat" />
> +      </function>
> +      <function name="ProgramUniform1iv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLint *" />
> +      </function>
> +      <function name="ProgramUniform2iv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLint *" />
> +      </function>
> +      <function name="ProgramUniform3iv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLint *" />
> +      </function>
> +      <function name="ProgramUniform4iv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLint *" />
> +      </function>
> +      <function name="ProgramUniform1uiv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLuint *" />
> +      </function>
> +      <function name="ProgramUniform2uiv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLuint *" />
> +      </function>
> +      <function name="ProgramUniform3uiv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLuint *" />
> +      </function>
> +      <function name="ProgramUniform4uiv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLuint *" />
> +      </function>
> +      <function name="ProgramUniform1fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniform2fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniform3fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniform4fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix2fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix3fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix4fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix2x3fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix3x2fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix2x4fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix4x2fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix3x4fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ProgramUniformMatrix4x3fv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLfloat *" />
> +      </function>
> +      <function name="ValidateProgramPipeline" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +      </function>
> +      <function name="GetProgramPipelineInfoLog" offset="assign">
> +         <param name="pipeline" type="GLuint" />
> +         <param name="bufSize" type="GLsizei" />
> +         <param name="length" type="GLsizei *" />
> +         <param name="infoLog" type="GLchar *" />
> +      </function>
> +
> +      <!-- depends on GL_ARB_gpu_shader_fp64
> +      <function name="ProgramUniform1d" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLdouble" />
> +      </function>
> +      <function name="ProgramUniform2d" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLdouble" />
> +         <param name="y" type="GLdouble" />
> +      </function>
> +      <function name="ProgramUniform3d" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLdouble" />
> +         <param name="y" type="GLdouble" />
> +         <param name="z" type="GLdouble" />
> +      </function>
> +      <function name="ProgramUniform4d" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="x" type="GLdouble" />
> +         <param name="y" type="GLdouble" />
> +         <param name="z" type="GLdouble" />
> +         <param name="w" type="GLdouble" />
> +      </function>
> +      <function name="ProgramUniformMatrix2x3dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix3x2dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix2x4dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix4x2dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix3x4dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix4x3dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix2dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix3dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniformMatrix4dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="transpose" type="GLboolean" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniform1dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniform2dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniform3dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      <function name="ProgramUniform4dv" offset="assign">
> +         <param name="program" type="GLuint" />
> +         <param name="location" type="GLint" />
> +         <param name="count" type="GLsizei" />
> +         <param name="value" type="const GLdouble *" />
> +      </function>
> +      -->
> +   </category>
> +</OpenGLAPI>
> diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
> index 36e47e2..ce1f797 100644
> --- a/src/mapi/glapi/gen/Makefile.am
> +++ b/src/mapi/glapi/gen/Makefile.am
> @@ -106,6 +106,7 @@ API_XML = \
>   	ARB_robustness.xml \
>   	ARB_sampler_objects.xml \
>   	ARB_seamless_cube_map.xml \
> +	ARB_separate_shader_objects.xml \
>   	ARB_sync.xml \
>   	ARB_texture_buffer_object.xml \
>   	ARB_texture_buffer_range.xml \
> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index df95924..05bed06 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -8270,7 +8270,11 @@
>     </function>
>   </category>
>
> -<!-- ARB extensions #95...#108 -->
> +<!-- ARB extensions #95...#96 -->
> +
> +<xi:include href="ARB_separate_shader_objects.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
> +
> +<!-- ARB extensions #98...#108 -->
>
>   <xi:include href="ARB_ES2_compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
>
> diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py
> index a85b447..b13ce48 100644
> --- a/src/mapi/glapi/gen/gl_genexec.py
> +++ b/src/mapi/glapi/gen/gl_genexec.py
> @@ -82,6 +82,7 @@ header = """/**
>   #include "main/lines.h"
>   #include "main/matrix.h"
>   #include "main/multisample.h"
> +#include "main/pipelineobj.h"
>   #include "main/pixel.h"
>   #include "main/pixelstore.h"
>   #include "main/points.h"
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index c7f038b..6072b9f 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -120,6 +120,7 @@ static const struct extension extension_table[] = {
>      { "GL_ARB_robustness",                          o(dummy_true),                              GL,             2010 },
>      { "GL_ARB_sampler_objects",                     o(dummy_true),                              GL,             2009 },
>      { "GL_ARB_seamless_cube_map",                   o(ARB_seamless_cube_map),                   GL,             2009 },
> +   { "GL_ARB_separate_shader_objects",             o(ARB_separate_shader_objects),             GLL,            2010 },

This should either be GLC or GL.  GLL causes the extension to only be 
advertised in compatibility profile contexts.  I think we either want 
this in both core and compatibility or core only.  I'm leaning towards 
the former since there are several shipping compatibility-profile apps 
(e.g., Serious Sam 3) that really want this extension.

>      { "GL_ARB_shader_bit_encoding",                 o(ARB_shader_bit_encoding),                 GL,             2010 },
>      { "GL_ARB_shader_objects",                      o(ARB_shader_objects),                      GL,             2002 },
>      { "GL_ARB_shader_stencil_export",               o(ARB_shader_stencil_export),               GL,             2009 },
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index e46fa39..05d8518 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2976,6 +2976,7 @@ struct gl_extensions
>      GLboolean ARB_occlusion_query2;
>      GLboolean ARB_point_sprite;
>      GLboolean ARB_seamless_cube_map;
> +   GLboolean ARB_separate_shader_objects;
>      GLboolean ARB_shader_bit_encoding;
>      GLboolean ARB_shader_objects;
>      GLboolean ARB_shader_stencil_export;
> diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
> new file mode 100644
> index 0000000..e7e628b
> --- /dev/null
> +++ b/src/mesa/main/pipelineobj.c
> @@ -0,0 +1,133 @@
> +/*
> + * Mesa 3-D graphics library
> + *
> + * Copyright © 2013 Gregory Hainaut <gregory.hainaut at gmail.com>
> + *
> + * 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
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * 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 NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS 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.
> + */
> +
> +/**
> + * \file pipelineobj.c
> + * \author Hainaut Gregory <gregory.hainaut at gmail.com>
> + *
> + * Implementation of pipeline object related API functions. Based on
> + * GL_ARB_separate_shader_objects extension.
> + *
> + */
> +
> +#include "main/glheader.h"
> +#include "main/context.h"
> +#include "main/dispatch.h"
> +#include "main/enums.h"
> +#include "main/hash.h"
> +#include "main/mfeatures.h"
> +#include "main/mtypes.h"
> +#include "main/pipelineobj.h"
> +#include "main/shaderapi.h"
> +#include "main/shaderobj.h"
> +#include "main/transformfeedback.h"
> +#include "main/uniforms.h"
> +#include "program/program.h"
> +#include "program/prog_parameter.h"
> +#include "ralloc.h"
> +#include <stdbool.h>
> +#include "../glsl/glsl_parser_extras.h"
> +#include "../glsl/ir_uniform.h"
> +
> +
> +/**
> + * Bound program to severals stages of the pipeline
> + */
> +void GLAPIENTRY
> +_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
> +{
> +}
> +
> +/**
> + * Use the named shader program for subsequent glUniform calls (if pipeline bound)
> + */
> +void GLAPIENTRY
> +_mesa_ActiveShaderProgram(GLuint pipeline, GLuint program)
> +{
> +}
> +
> +/**
> + * Make program of the pipeline current
> + */
> +void GLAPIENTRY
> +_mesa_BindProgramPipeline(GLuint pipeline)
> +{
> +}
> +
> +/**
> + * Delete a set of pipeline objects.
> + *
> + * \param n      Number of pipeline objects to delete.
> + * \param ids    pipeline of \c n pipeline object IDs.
> + */
> +void GLAPIENTRY
> +_mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
> +{
> +}
> +
> +/**
> + * Generate a set of unique pipeline object IDs and store them in \c pipelines.
> + * \param n       Number of IDs to generate.
> + * \param pipelines  pipeline of \c n locations to store the IDs.
> + */
> +void GLAPIENTRY
> +_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines)
> +{
> +}
> +
> +/**
> + * Determine if ID is the name of an pipeline object.
> + *
> + * \param id  ID of the potential pipeline object.
> + * \return  \c GL_TRUE if \c id is the name of a pipeline object,
> + *          \c GL_FALSE otherwise.
> + */
> +GLboolean GLAPIENTRY
> +_mesa_IsProgramPipeline(GLuint pipeline)
> +{
> +   return GL_FALSE;
> +}
> +
> +/**
> + * glGetProgramPipelineiv() - get pipeline shader state.
> + */
> +void GLAPIENTRY
> +_mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
> +{
> +}
> +
> +/**
> + * Check compatibility of pipeline's program
> + */
> +void GLAPIENTRY
> +_mesa_ValidateProgramPipeline(GLuint pipeline)
> +{
> +}
> +
> +void GLAPIENTRY
> +_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize,
> +      GLsizei *length, GLchar *infoLog)
> +{
> +}
> diff --git a/src/mesa/main/pipelineobj.h b/src/mesa/main/pipelineobj.h
> new file mode 100644
> index 0000000..d0301fe
> --- /dev/null
> +++ b/src/mesa/main/pipelineobj.h
> @@ -0,0 +1,74 @@
> +/*
> + * Mesa 3-D graphics library
> + *
> + * Copyright © 2013 Gregory Hainaut <gregory.hainaut at gmail.com>
> + *
> + * 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
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * 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 NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS 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.
> + */
> +
> +#ifndef PIPELINEOBJ_H
> +#define PIPELINEOBJ_H
> +
> +
> +#include "glheader.h"
> +
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +
> +struct _glapi_table;
> +struct gl_context;
> +
> +extern void GLAPIENTRY
> +_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
> +
> +extern void GLAPIENTRY
> +_mesa_ActiveShaderProgram(GLuint pipeline, GLuint program);
> +
> +extern void GLAPIENTRY
> +_mesa_BindProgramPipeline(GLuint pipeline);
> +
> +extern void GLAPIENTRY
> +_mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
> +
> +extern void GLAPIENTRY
> +_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines);
> +
> +extern GLboolean GLAPIENTRY
> +_mesa_IsProgramPipeline(GLuint pipeline);
> +
> +extern void GLAPIENTRY
> +_mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
> +
> +extern void GLAPIENTRY
> +_mesa_ValidateProgramPipeline(GLuint pipeline);
> +
> +extern void GLAPIENTRY
> +_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize,
> +      GLsizei *length, GLchar *infoLog);
> +
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* PIPELINEOBJ_H */
> diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
> index c05da10..f4c2482 100644
> --- a/src/mesa/main/shaderapi.c
> +++ b/src/mesa/main/shaderapi.c
> @@ -1812,3 +1812,12 @@ _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string)
>
>      return program;
>   }
> +
> +/**
> + * ARB_separate_shader_objects: Compile & Link Program
> + */
> +GLuint GLAPIENTRY
> +_mesa_CreateShaderProgramv(GLenum type, GLsizei count, const GLchar* const *strings)
> +{
> +   return 0;
> +}
> diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
> index 342b589..e0bd77d 100644
> --- a/src/mesa/main/shaderapi.h
> +++ b/src/mesa/main/shaderapi.h
> @@ -209,6 +209,9 @@ _mesa_ActiveProgramEXT(GLuint program);
>   extern GLuint GLAPIENTRY
>   _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
>
> +/* GL_ARB_separate_shader_objects */
> +extern GLuint GLAPIENTRY
> +_mesa_CreateShaderProgramv(GLenum type, GLsizei count, const GLchar* const *strings);
>
>   #ifdef __cplusplus
>   }
> diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
> index d902407..9529593 100644
> --- a/src/mesa/main/uniforms.c
> +++ b/src/mesa/main/uniforms.c
> @@ -264,6 +264,203 @@ _mesa_Uniform4iv(GLint location, GLsizei count, const GLint * value)
>      _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
>   }
>
> +/** Same as above with direct state access **/
> +void GLAPIENTRY
> +_mesa_ProgramUniform1f(GLuint program, GLint location, GLfloat v0)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform1f");
> +   _mesa_uniform(ctx, shProg, location, 1, &v0, GL_FLOAT);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLfloat v[2];
> +   v[0] = v0;
> +   v[1] = v1;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform2f");

Our friends that compile with Visual Studio will have a problem with 
this... it only does C89, so you can't mix declarations and code.

> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC2);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1,
> +                       GLfloat v2)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLfloat v[3];
> +   v[0] = v0;
> +   v[1] = v1;
> +   v[2] = v2;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform3f");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC3);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1,
> +                       GLfloat v2, GLfloat v3)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLfloat v[4];
> +   v[0] = v0;
> +   v[1] = v1;
> +   v[2] = v2;
> +   v[3] = v3;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform4f");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_FLOAT_VEC4);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform1i(GLuint program, GLint location, GLint v0)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform1i");
> +   _mesa_uniform(ctx, shProg, location, 1, &v0, GL_INT);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLint v[2];
> +   v[0] = v0;
> +   v[1] = v1;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform2i");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC2);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1,
> +                       GLint v2)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLint v[3];
> +   v[0] = v0;
> +   v[1] = v1;
> +   v[2] = v2;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform3i");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC3);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1,
> +                       GLint v2, GLint v3)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLint v[4];
> +   v[0] = v0;
> +   v[1] = v1;
> +   v[2] = v2;
> +   v[3] = v3;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform4i");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_INT_VEC4);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform1fv(GLuint program, GLint location, GLsizei count,
> +                        const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform1fv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_FLOAT);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform2fv(GLuint program, GLint location, GLsizei count,
> +                        const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform2fv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_FLOAT_VEC2);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform3fv(GLuint program, GLint location, GLsizei count,
> +                        const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform3fv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_FLOAT_VEC3);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform4fv(GLuint program, GLint location, GLsizei count,
> +                        const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform4fv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_FLOAT_VEC4);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform1iv(GLuint program, GLint location, GLsizei count,
> +                        const GLint * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform1iv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_INT);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform2iv(GLuint program, GLint location, GLsizei count,
> +                        const GLint * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform2iv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_INT_VEC2);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform3iv(GLuint program, GLint location, GLsizei count,
> +                        const GLint * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform3iv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_INT_VEC3);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform4iv(GLuint program, GLint location, GLsizei count,
> +                        const GLint * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform4iv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_INT_VEC4);
> +}
> +
>
>   /** OpenGL 3.0 GLuint-valued functions **/
>   void GLAPIENTRY
> @@ -363,6 +560,141 @@ _mesa_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
>   			4, 4, location, count, transpose, value);
>   }
>
> +/** Same as above with direct state access **/
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform1ui(GLuint program, GLint location, GLuint v0)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform1ui");
> +   _mesa_uniform(ctx, shProg, location, 1, &v0, GL_UNSIGNED_INT);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLuint v[2];
> +   v[0] = v0;
> +   v[1] = v1;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform2ui");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC2);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1,
> +                        GLuint v2)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLuint v[3];
> +   v[0] = v0;
> +   v[1] = v1;
> +   v[2] = v2;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform3ui");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC3);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1,
> +                        GLuint v2, GLuint v3)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   GLuint v[4];
> +   v[0] = v0;
> +   v[1] = v1;
> +   v[2] = v2;
> +   v[3] = v3;
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform4ui");
> +   _mesa_uniform(ctx, shProg, location, 1, v, GL_UNSIGNED_INT_VEC4);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform1uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform1uiv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_UNSIGNED_INT);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform2uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform2uiv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_UNSIGNED_INT_VEC2);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform3uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform3uiv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_UNSIGNED_INT_VEC3);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform4uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniform4uiv");
> +   _mesa_uniform(ctx, shProg, location, count, value, GL_UNSIGNED_INT_VEC4);
> +}
> +
> +
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count,
> +                              GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix2fv");
> +   _mesa_uniform_matrix(ctx, shProg, 2, 2, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count,
> +                              GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix3fv");
> +   _mesa_uniform_matrix(ctx, shProg, 3, 3, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count,
> +                              GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix4fv");
> +   _mesa_uniform_matrix(ctx, shProg, 4, 4, location, count, transpose, value);
> +}
> +
>
>   /**
>    * Non-square UniformMatrix are OpenGL 2.1
> @@ -421,6 +753,74 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
>   			4, 3, location, count, transpose, value);
>   }
>
> +/** Same as above with direct state access **/
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix2x3fv");
> +   _mesa_uniform_matrix(ctx, shProg, 2, 3, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix3x2fv");
> +   _mesa_uniform_matrix(ctx, shProg, 3, 2, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix2x4fv");
> +   _mesa_uniform_matrix(ctx, shProg, 2, 4, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix4x2fv");
> +   _mesa_uniform_matrix(ctx, shProg, 4, 2, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix3x4fv");
> +   _mesa_uniform_matrix(ctx, shProg, 3, 4, location, count, transpose, value);
> +}
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat * value)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_shader_program *shProg =
> +      _mesa_lookup_shader_program_err(ctx, program,
> +            "glProgramUniformMatrix4x3fv");
> +   _mesa_uniform_matrix(ctx, shProg, 4, 3, location, count, transpose, value);
> +}
> +
>
>   void GLAPIENTRY
>   _mesa_GetnUniformfvARB(GLhandleARB program, GLint location,
> diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
> index a12ad9b..8c67697 100644
> --- a/src/mesa/main/uniforms.h
> +++ b/src/mesa/main/uniforms.h
> @@ -110,6 +110,89 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
>   void GLAPIENTRY
>   _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
>                            const GLfloat *value);
> +
> +void GLAPIENTRY
> +_mesa_ProgramUniform1f(GLuint program, GLint, GLfloat);
> +void GLAPIENTRY
> +_mesa_ProgramUniform2f(GLuint program, GLint, GLfloat, GLfloat);
> +void GLAPIENTRY
> +_mesa_ProgramUniform3f(GLuint program, GLint, GLfloat, GLfloat, GLfloat);
> +void GLAPIENTRY
> +_mesa_ProgramUniform4f(GLuint program, GLint, GLfloat, GLfloat, GLfloat, GLfloat);
> +void GLAPIENTRY
> +_mesa_ProgramUniform1i(GLuint program, GLint, GLint);
> +void GLAPIENTRY
> +_mesa_ProgramUniform2i(GLuint program, GLint, GLint, GLint);
> +void GLAPIENTRY
> +_mesa_ProgramUniform3i(GLuint program, GLint, GLint, GLint, GLint);
> +void GLAPIENTRY
> +_mesa_ProgramUniform4i(GLuint program, GLint, GLint, GLint, GLint, GLint);
> +void GLAPIENTRY
> +_mesa_ProgramUniform1fv(GLuint program, GLint, GLsizei, const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform2fv(GLuint program, GLint, GLsizei, const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform3fv(GLuint program, GLint, GLsizei, const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform4fv(GLuint program, GLint, GLsizei, const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform1iv(GLuint program, GLint, GLsizei, const GLint *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform2iv(GLuint program, GLint, GLsizei, const GLint *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform3iv(GLuint program, GLint, GLsizei, const GLint *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform4iv(GLuint program, GLint, GLsizei, const GLint *);
> +void GLAPIENTRY
> +_mesa_ProgramUniform1ui(GLuint program, GLint location, GLuint v0);
> +void GLAPIENTRY
> +_mesa_ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
> +void GLAPIENTRY
> +_mesa_ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1,
> +                        GLuint v2);
> +void GLAPIENTRY
> +_mesa_ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1,
> +                        GLuint v2, GLuint v3);
> +void GLAPIENTRY
> +_mesa_ProgramUniform1uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniform2uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniform3uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniform4uiv(GLuint program, GLint location, GLsizei count,
> +                         const GLuint *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix2fv(GLuint program, GLint, GLsizei, GLboolean,
> +                              const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix3fv(GLuint program, GLint, GLsizei, GLboolean,
> +                              const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix4fv(GLuint program, GLint, GLsizei, GLboolean,
> +                              const GLfloat *);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat *value);
> +void GLAPIENTRY
> +_mesa_ProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count,
> +                                GLboolean transpose, const GLfloat *value);
> +
>   void GLAPIENTRY
>   _mesa_GetnUniformfvARB(GLhandleARB, GLint, GLsizei, GLfloat *);
>   void GLAPIENTRY
> diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
> index a5c1f5d..cb96a10 100644
> --- a/src/mesa/sources.mak
> +++ b/src/mesa/sources.mak
> @@ -64,6 +64,7 @@ MAIN_FILES = \
>   	$(SRCDIR)main/multisample.c \
>   	$(SRCDIR)main/pack.c \
>   	$(SRCDIR)main/pbo.c \
> +	$(SRCDIR)main/pipelineobj.c \
>   	$(SRCDIR)main/pixel.c \
>   	$(SRCDIR)main/pixelstore.c \
>   	$(SRCDIR)main/pixeltransfer.c \
>



More information about the mesa-dev mailing list