i965: Fix new FS gen6 interpolation for sparsely-populated arrays.
authorEric Anholt <eric@anholt.net>
Fri, 8 Oct 2010 18:14:48 +0000 (11:14 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 8 Oct 2010 18:59:19 +0000 (11:59 -0700)
We'd overwrite the same element twice.

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

index 710eb0bb7219822be0ee9354db076f182f1c86b8..bc49ee8fe0d95a5cc35962c45145e0983b441529 100644 (file)
@@ -813,9 +813,9 @@ fs_visitor::emit_general_interpolation(ir_variable *ir)
                         fs_reg(interp)));
            attr.reg_offset++;
         }
-        attr.reg_offset -= type->vector_elements;
 
         if (intel->gen < 6) {
+           attr.reg_offset -= type->vector_elements;
            for (unsigned int c = 0; c < type->vector_elements; c++) {
               emit(fs_inst(BRW_OPCODE_MUL,
                            attr,