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 3272868..49093d8 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 49ee2fe..4c5115b 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 7d5906d..cb96a20 100644 (file)
@@ -518,16 +518,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.
     */
    int index;
index c221a96..b94ff05 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 3e24842..f1284ad 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;
            }