From: Ian Romanick Date: Tue, 22 Jan 2013 06:14:36 +0000 (-0500) Subject: glsl: Remove ir_variable::uniform_block X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22233da1ee4b59663966169759960c00c033d0e9;p=mesa.git glsl: Remove ir_variable::uniform_block v2: A previous patch contained a spurious hunk that removed an assignment to ir_variable::uniform_block. That hunk was moved to this patch. Suggested by Carl Worth. Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 3272868ee83..49093d88f8e 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -4274,7 +4274,6 @@ ast_uniform_block::hir(exec_list *instructions, new(state) ir_variable(fields[i].type, ralloc_strdup(state, fields[i].name), ir_var_uniform); - var->uniform_block = ubo - state->uniform_blocks; var->interface_type = block_type; state->symbols->add_variable(var); diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 49ee2fe9ef4..4c5115b98cf 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1525,7 +1525,6 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name, this->has_initializer = false; this->location = -1; this->location_frac = 0; - this->uniform_block = -1; this->warn_extension = NULL; this->constant_value = NULL; this->constant_initializer = NULL; diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 7d5906d1d4f..cb96a200aa9 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -517,16 +517,6 @@ public: */ int location; - /** - * Uniform block number for uniforms. - * - * This index is into the shader's list of uniform blocks, not the - * linked program's merged list. - * - * If the variable is not in a uniform block, the value will be -1. - */ - int uniform_block; - /** * output index for dual source blending. */ diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index c221a96c3f3..b94ff05df6c 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -50,7 +50,6 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const var->interpolation = this->interpolation; var->location = this->location; var->index = this->index; - var->uniform_block = this->uniform_block; var->warn_extension = this->warn_extension; var->origin_upper_left = this->origin_upper_left; var->pixel_center_integer = this->pixel_center_integer; diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 3e24842a026..f1284adb293 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -575,7 +575,6 @@ link_update_uniform_buffer_variables(struct gl_shader *shader) } else if (!strcmp(var->name, shader->UniformBlocks[i].Uniforms[j].Name)) { found = true; - var->uniform_block = i; var->location = j; break; }