From 88612e2c1b1580b92d229ec6d2236fe07b32e060 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 30 Aug 2011 16:40:06 -0700 Subject: [PATCH] i965/vs: Fix constant-indexed array read/write addresses on pre-gen6. The second vertex was getting a garbage index. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp index 828a9c1f9cb..61a1092bbff 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp @@ -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)); -- 2.30.2