diff options
author | Cooper Yuan <cooperyuan@gmail.com> | 2009-07-02 16:49:19 +0800 |
---|---|---|
committer | Cooper Yuan <cooperyuan@gmail.com> | 2009-07-02 16:49:19 +0800 |
commit | da88333671b35851bd713d0de464887e00d70593 (patch) | |
tree | 8a828d3ccca80c0f1c8e06644164ba23718f7442 /src/mesa | |
parent | 8bda0f1f4feec3bc4625c505feed48c49afaf0b6 (diff) |
R6xx/r7xx: Correct the indeices of DRAW_INDEX_IMMD
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_render.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index e46b21c85c..a1ad929a67 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -238,6 +238,7 @@ static GLboolean r700RunRender(GLcontext * ctx, { context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); + int lastIndex = 0; #if 1 BATCH_LOCALS(&context->radeon); @@ -308,7 +309,6 @@ static GLboolean r700RunRender(GLcontext * ctx, GLuint end = vb->Primitive[i].start + vb->Primitive[i].count; GLuint numIndices = vb->Primitive[i].count; GLuint numEntires; - //r300RunRenderPrimitive(rmesa, ctx, start, end, prim); unsigned int VGT_DRAW_INITIATOR = 0; unsigned int VGT_INDEX_TYPE = 0; @@ -340,10 +340,12 @@ static GLboolean r700RunRender(GLcontext * ctx, R600_OUT_BATCH(VGT_NUM_INDICES); R600_OUT_BATCH(VGT_DRAW_INITIATOR); - for (j=0; j<numIndices; j++) + for (j = lastIndex; j < lastIndex + numIndices; j++) { R600_OUT_BATCH(j); } + lastIndex += numIndices; + END_BATCH(); COMMIT_BATCH(); } |