diff options
author | Corbin Simpson <[email protected]> | 2009-04-15 14:12:11 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-04-15 15:10:24 -0700 |
commit | a4e0a46a8d6a4f308216c085849305ad82c52f15 (patch) | |
tree | 76d0def4c4b5e1cdf211dd27e0582eef8ffff586 /src/gallium | |
parent | a5f68b40cb4299b54d5cb400bbbf4338673d82ec (diff) |
r300-gallium: Don't use indexbufs for now.
They aren't working, so best to turn it off.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | 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 b7ee8fb8a94..cbd84d7c569 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; } |