diff options
author | Brian Paul <[email protected]> | 2008-08-19 10:27:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-19 10:27:06 -0600 |
commit | 3e1706f720b211f27a4aa88af2141db0c793adbb (patch) | |
tree | ed60e31df217ec796fa024c3327e4b40982f1c09 /src/mesa/shader/prog_parameter.h | |
parent | df9bd01ea0c8a4d5b5ffecad4482ca6b4f2db33d (diff) |
mesa: glsl: add usage tracking for uniform vars
Unused uniforms are no longer included in the active uniforms list.
Diffstat (limited to 'src/mesa/shader/prog_parameter.h')
-rw-r--r-- | src/mesa/shader/prog_parameter.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index ac5c629fabc..e8d3e9ec336 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -48,6 +48,7 @@ struct gl_program_parameter enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ GLenum DataType; /**< GL_FLOAT, GL_FLOAT_VEC2, etc */ GLuint Size; /**< Number of components (1..4) */ + GLboolean Used; /**< Helper flag for GLSL uniform tracking */ /** * A sequence of STATE_* tokens and integers to identify GL state. */ @@ -112,6 +113,10 @@ extern GLint _mesa_add_uniform(struct gl_program_parameter_list *paramList, const char *name, GLuint size, GLenum datatype); +extern void +_mesa_use_uniform(struct gl_program_parameter_list *paramList, + const char *name); + extern GLint _mesa_add_sampler(struct gl_program_parameter_list *paramList, const char *name, GLenum datatype); |