i965: set the source width/stride when handling reladdr dests in the VS.
authorEric Anholt <eric@anholt.net>
Sat, 4 Sep 2010 04:56:53 +0000 (21:56 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 7 Sep 2010 17:34:09 +0000 (10:34 -0700)
This is a requirement specified in the docs.  No behavior change in
glsl-vs-varying-array.shader_test that violated these requirements.

src/mesa/drivers/dri/i965/brw_vs_emit.c

index 1d88c6b5a461d516b69a31f7efda621045448d37..49ef9742a25ee1782f1b4440c54d9527d0c400e0 100644 (file)
@@ -1069,6 +1069,12 @@ move_to_reladdr_dst(struct brw_vs_compile *c,
    struct brw_reg indirect = brw_vec4_indirect(0,0);
    struct brw_reg acc = retype(vec1(get_tmp(c)), BRW_REGISTER_TYPE_UW);
 
+   /* Because destination register indirect addressing can only use
+    * one index, we'll write each vertex's vec4 value separately.
+    */
+   val.width = BRW_WIDTH_4;
+   val.vstride = BRW_VERTICAL_STRIDE_4;
+
    brw_push_insn_state(p);
    brw_set_access_mode(p, BRW_ALIGN_1);