glsl: Remove ir_variable::uniform_block
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Jan 2013 06:14:36 +0000 (01:14 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 14:07:36 +0000 (09:07 -0500)
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 <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_clone.cpp
src/glsl/link_uniforms.cpp

index 3272868ee8372e092af2041688533a8f00a005ff..49093d88f8e6f8a215397978364eccb2dad0940a 100644 (file)
@@ -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);
index 49ee2fe9ef4f32a7b4babfdaff2099b343153e3b..4c5115b98cfe54bf78a02b04bdb75233df0a3a3a 100644 (file)
@@ -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;
index 7d5906d1d4f82786f293937eff506f6100e8b56d..cb96a200aa97468b4a8c0c015d5880f44cbe9ae3 100644 (file)
@@ -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.
     */
index c221a96c3f3562504e134ea9d70dcd0768781264..b94ff05df6c47df23e1f162e721285eee86c943b 100644 (file)
@@ -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;
index 3e24842a0265076c958dfc1c73b382b57db20c43..f1284adb293c2213acc007965e58a2af1a0a3e5d 100644 (file)
@@ -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;
            }