i965/vs: Fix constant-indexed array read/write addresses on pre-gen6.
authorEric Anholt <eric@anholt.net>
Tue, 30 Aug 2011 23:40:06 +0000 (16:40 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 7 Sep 2011 01:01:48 +0000 (18:01 -0700)
The second vertex was getting a garbage index.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp

index 828a9c1f9cb0007f3cefe49ee524ed4315c6c475..61a1092bbff187db28586fd422ac9f9580acffde 100644 (file)
@@ -377,7 +377,7 @@ vec4_visitor::generate_oword_dual_block_offsets(struct brw_reg m1,
 
    brw_set_predicate_inverse(p, true);
    if (index.file == BRW_IMMEDIATE_VALUE) {
-      index_4.dw1.ud++;
+      index_4.dw1.ud += second_vertex_offset;
       brw_MOV(p, m1_4, index_4);
    } else {
       brw_ADD(p, m1_4, index_4, brw_imm_d(second_vertex_offset));