glsl: Add ir_variable::is_in_uniform_block predicate

The way a variable is tested for this property is about to change, and
this makes the code easier to modify.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Ian Romanick
2012-12-14 12:00:14 -08:00
parent 17e6f19044
commit 13be1f4a10
8 changed files with 16 additions and 8 deletions

View File

@@ -2470,7 +2470,7 @@ _mesa_generate_parameters_list_for_uniforms(struct gl_shader_program
ir_variable *var = ((ir_instruction *) node)->as_variable();
if ((var == NULL) || (var->mode != ir_var_uniform)
|| var->uniform_block != -1 || (strncmp(var->name, "gl_", 3) == 0))
|| var->is_in_uniform_block() || (strncmp(var->name, "gl_", 3) == 0))
continue;
add.process(var);