r600g: add vgt dma src defines
authorDave Airlie <airlied@redhat.com>
Wed, 15 Sep 2010 23:41:43 +0000 (09:41 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 15 Sep 2010 23:41:43 +0000 (09:41 +1000)
src/gallium/drivers/r600/r600_draw.c
src/gallium/drivers/r600/r600d.h

index 17cc5a4abbc9573d466fe9ac70091111cfd42b6d..d0de1658ba18db2c781b70f5d6c43c527cbd6cab 100644 (file)
@@ -54,15 +54,15 @@ static int r600_draw_common(struct r600_draw *draw)
                return r;
        switch (draw->index_size) {
        case 2:
-               vgt_draw_initiator = 0;
+               vgt_draw_initiator = S_0287F0_SOURCE_SELECT(V_0287F0_DI_SRC_SEL_DMA);
                vgt_dma_index_type = 0;
                break;
        case 4:
-               vgt_draw_initiator = 0;
+               vgt_draw_initiator = S_0287F0_SOURCE_SELECT(V_0287F0_DI_SRC_SEL_DMA);
                vgt_dma_index_type = 1;
                break;
        case 0:
-               vgt_draw_initiator = 2;
+               vgt_draw_initiator = S_0287F0_SOURCE_SELECT(V_0287F0_DI_SRC_SEL_AUTO_INDEX);
                vgt_dma_index_type = 0;
                break;
        default:
index 259927e5fa0518f75909a45998d9e0e2bc113af4..8ef007494d6d5806083dad88d3a1c659f7a2113f 100644 (file)
 #define   S_0287F0_SOURCE_SELECT(x)                    (((x) & 0x3) << 0)
 #define   G_0287F0_SOURCE_SELECT(x)                    (((x) >> 0) & 0x3)
 #define   C_0287F0_SOURCE_SELECT                       0xFFFFFFFC
+#define     V_0287F0_DI_SRC_SEL_DMA                    0
+#define     V_0287F0_DI_SRC_SEL_AUTO_INDEX             2
 #define   S_0287F0_MAJOR_MODE(x)                       (((x) & 0x3) << 2)
 #define   G_0287F0_MAJOR_MODE(x)                       (((x) >> 2) & 0x3)
 #define   C_0287F0_MAJOR_MODE                          0xFFFFFFF3