r300-gallium: Don't use indexbufs for now.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 15 Apr 2009 21:12:11 +0000 (14:12 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 15 Apr 2009 22:10:24 +0000 (15:10 -0700)
They aren't working, so best to turn it off.

src/gallium/drivers/r300/r300_render.c

index b7ee8fb8a94fd257777e2e3b42bc048c86be2ab3..cbd84d7c569d9fe9b3a04d82e6040b2c8aa079da 100644 (file)
@@ -234,6 +234,8 @@ static void r300_render_draw(struct vbuf_render* render,
     struct pipe_screen* screen = r300->context.screen;
     struct pipe_buffer* index_buffer;
     void* index_map;
+    int i;
+    uint32_t index;
 
     CS_LOCALS(r300);
 
@@ -252,14 +254,24 @@ static void r300_render_draw(struct vbuf_render* render,
     pipe_buffer_unmap(screen, index_buffer);
 
     debug_printf("r300: Doing indexbuf render, count %d\n", count);
-
-    BEGIN_CS(6);
+/*
+    BEGIN_CS(8);
     OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, 0);
     OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
            r300render->hwprim);
     OUT_CS_PKT3(R300_PACKET3_INDX_BUFFER, 2);
     OUT_CS(R300_INDX_BUFFER_ONE_REG_WR | (R300_VAP_PORT_IDX0 >> 2));
     OUT_CS_INDEX_RELOC(index_buffer, 0, count, RADEON_GEM_DOMAIN_GTT, 0, 0);
+    END_CS; */
+
+    BEGIN_CS(2 + count);
+    OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, count);
+    OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
+           r300render->hwprim | R300_VAP_VF_CNTL__INDEX_SIZE_32bit);
+    for (i = 0; i < count; i++) {
+        index = indices[i];
+        OUT_CS(index);
+    }
     END_CS;
 }