r600: route indirect address register correctly for vtx fetches.
authorDave Airlie <airlied@redhat.com>
Thu, 31 Mar 2016 05:46:30 +0000 (15:46 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 26 Jun 2017 06:23:20 +0000 (16:23 +1000)
This was found during writing the images code, we need to
make sure we route the correct index register.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_asm.c

index 3dcbde0fe5b311638a1676b9b5cf45673373854b..27f564768e0e506c8cd2505e23e73389c8f9d532 100644 (file)
@@ -1348,7 +1348,7 @@ int r600_bytecode_add_vtx(struct r600_bytecode *bc, const struct r600_bytecode_v
        /* Load index register if required */
        if (bc->chip_class >= EVERGREEN) {
                if (vtx->buffer_index_mode)
-                       egcm_load_index_reg(bc, 0, false);
+                       egcm_load_index_reg(bc, vtx->buffer_index_mode - 1, false);
        }
 
        /* cf can contains only alu or only vtx or only tex */