i965: Fix array indexing of arrays of matrices.
authorEric Anholt <eric@anholt.net>
Tue, 28 Sep 2010 22:25:40 +0000 (15:25 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 28 Sep 2010 23:26:49 +0000 (16:26 -0700)
The deleted code was meant to be handling indexing of a matrix, which
would have been a noop if it had been correct.

src/mesa/drivers/dri/i965/brw_fs.cpp

index feb0cc156cb4657e6e779d303d1f667eeff4a722..2ed5f26ebd83450048da928c7147476c1426a892 100644 (file)
@@ -796,12 +796,8 @@ fs_visitor::visit(ir_dereference_array *ir)
    ir->array->accept(this);
    index = ir->array_index->as_constant();
 
-   if (ir->type->is_matrix()) {
-      element_size = ir->type->vector_elements;
-   } else {
-      element_size = type_size(ir->type);
-      this->result.type = brw_type_for_base_type(ir->type);
-   }
+   element_size = type_size(ir->type);
+   this->result.type = brw_type_for_base_type(ir->type);
 
    if (index) {
       assert(this->result.file == UNIFORM ||
@@ -809,7 +805,7 @@ fs_visitor::visit(ir_dereference_array *ir)
              this->result.reg != 0));
       this->result.reg_offset += index->value.i[0] * element_size;
    } else {
-      assert(!"FINISHME: non-constant matrix column");
+      assert(!"FINISHME: non-constant array element");
    }
 }