mesa: Rewrite the way uniforms are tracked and handled
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 18 Oct 2011 23:01:49 +0000 (16:01 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Nov 2011 21:33:16 +0000 (13:33 -0800)
commit719909698c67c287a393d2380278e7b7495ae018
tree1a49879205ab93ea2d67db62cd8282b60302bdd7
parent143d20c16a33e2f08e834b28c23dbea772591ef9
mesa: Rewrite the way uniforms are tracked and handled

Switch all of the code in ir_to_mesa, st_glsl_to_tgsi, glUniform*,
glGetUniform, glGetUniformLocation, and glGetActiveUniforms to use the
gl_uniform_storage structures in the gl_shader_program.

A couple of notes:

 * Like most rewrite-the-world patches, this should be reviewed by
   applying the patch and examining the modified functions.

 * This leaves a lot of dead code around in linker.cpp and
   uniform_query.cpp.  This will be deleted in the next patches.

v2: Update the comment block (previously a FINISHME) in _mesa_uniform
about generating GL_INVALID_VALUE when an out-of-range sampler index
is specified.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
src/glsl/linker.cpp
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.c
src/mesa/main/uniform_query.cpp
src/mesa/main/uniforms.c
src/mesa/main/uniforms.h
src/mesa/program/ir_to_mesa.cpp
src/mesa/program/sampler.cpp
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp