diff options
author | Eric Anholt <[email protected]> | 2010-08-24 15:43:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-24 16:37:02 -0700 |
commit | 2f5bf20e44d509fa3afbe2cfbb9bb65347daea6a (patch) | |
tree | 52d357a3350aee48ade8ba5c42dc4e17b314b637 /src/mesa/main/uniforms.h | |
parent | 7de4d8fe11c53e59265b8a4252ab9940ffcc9929 (diff) |
glsl: Set up uniform initializers by walking the shaders after linking.
Previously, uniform initializers were handled by ir_to_mesa as it made
its Parameters list. However, uniform values are global to all
shaders, and the value set in one Parameters list wasn't propagated to
the other gl_program->Parameters lists. By going back through the
general Mesa uniform handling, we make sure that all gl_programs get
updated values, and also successfully separate uniform initializer
handling from ir_to_mesa gl_program generation.
Fixes:
glsl-uniform-initializer-5.
Diffstat (limited to 'src/mesa/main/uniforms.h')
-rw-r--r-- | src/mesa/main/uniforms.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h index ef98fe16bb1..f823c614447 100644 --- a/src/mesa/main/uniforms.h +++ b/src/mesa/main/uniforms.h @@ -150,7 +150,20 @@ _mesa_GetUniformivARB(GLhandleARB, GLint, GLint *); extern GLint GLAPIENTRY _mesa_GetUniformLocationARB(GLhandleARB, const GLcharARB *); - +GLint +_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg, + const GLchar *name); + +void +_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shader_program, + GLint location, GLsizei count, + const GLvoid *values, GLenum type); + +void +_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg, + GLint cols, GLint rows, + GLint location, GLsizei count, + GLboolean transpose, const GLfloat *values); extern void _mesa_update_shader_textures_used(struct gl_program *prog); |