Mesa (master): r300-gallium: Don't use indexbufs for now.

Corbin Simpson csimpson at kemper.freedesktop.org
Wed Apr 15 22:36:44 UTC 2009


Module: Mesa
Branch: master
Commit: a4e0a46a8d6a4f308216c085849305ad82c52f15
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4e0a46a8d6a4f308216c085849305ad82c52f15

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Wed Apr 15 14:12:11 2009 -0700

r300-gallium: Don't use indexbufs for now.

They aren't working, so best to turn it off.

---

 src/gallium/drivers/r300/r300_render.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index b7ee8fb..cbd84d7 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -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;
 }
 




More information about the mesa-commit mailing list