[Mesa-dev] [PATCH 06/10] i965/vs: Fix constant-indexed array read/write addresses on pre-gen6.

Eric Anholt eric at anholt.net
Fri Sep 2 18:37:16 PDT 2011


The second vertex was getting a garbage index.
---
 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 828a9c1..61a1092 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));
-- 
1.7.5.4



More information about the mesa-dev mailing list