glsl_to_tgsi: remove unused parameters from calc_deref_offsets
authorMarek Olšák <marek.olsak@amd.com>
Sun, 16 Oct 2016 19:22:11 +0000 (21:22 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 19 Oct 2016 17:26:30 +0000 (19:26 +0200)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 7adfaafac6f56ed01c417b605db9c6fb4fdec07b..a5b2fa76c6605e192c597a644372a0f346897762 100644 (file)
@@ -559,10 +559,8 @@ public:
                           unsigned *index,
                           st_src_reg *reladdr,
                           bool opaque);
-  void calc_deref_offsets(ir_dereference *head,
-                          ir_dereference *tail,
+  void calc_deref_offsets(ir_dereference *tail,
                           unsigned *array_elements,
-                          unsigned *base,
                           unsigned *index,
                           st_src_reg *indirect,
                           unsigned *location);
@@ -3913,10 +3911,8 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
 }
 
 void
-glsl_to_tgsi_visitor::calc_deref_offsets(ir_dereference *head,
-                                         ir_dereference *tail,
+glsl_to_tgsi_visitor::calc_deref_offsets(ir_dereference *tail,
                                          unsigned *array_elements,
-                                         unsigned *base,
                                          unsigned *index,
                                          st_src_reg *indirect,
                                          unsigned *location)
@@ -3927,7 +3923,7 @@ glsl_to_tgsi_visitor::calc_deref_offsets(ir_dereference *head,
       const glsl_type *struct_type = deref_record->record->type;
       int field_index = deref_record->record->type->field_index(deref_record->field);
 
-      calc_deref_offsets(head, deref_record->record->as_dereference(), array_elements, base, index, indirect, location);
+      calc_deref_offsets(deref_record->record->as_dereference(), array_elements, index, indirect, location);
 
       assert(field_index >= 0);
       *location += struct_type->record_location_offset(field_index);
@@ -3964,7 +3960,7 @@ glsl_to_tgsi_visitor::calc_deref_offsets(ir_dereference *head,
 
       *array_elements *= deref_arr->array->type->length;
 
-      calc_deref_offsets(head, deref_arr->array->as_dereference(), array_elements, base, index, indirect, location);
+      calc_deref_offsets(deref_arr->array->as_dereference(), array_elements, index, indirect, location);
       break;
    }
    default:
@@ -3992,7 +3988,7 @@ glsl_to_tgsi_visitor::get_deref_offsets(ir_dereference *ir,
 
    assert(var);
    location = var->data.location;
-   calc_deref_offsets(ir, ir, array_size, base, index, reladdr, &location);
+   calc_deref_offsets(ir, array_size, index, reladdr, &location);
 
    /*
     * If we end up with no indirect then adjust the base to the index,