From 463c1d6c57a3df87b57a74f9bdbd365eb99f2a42 Mon Sep 17 00:00:00 2001 From: Aapo Tahkola Date: Thu, 16 Jun 2005 10:27:04 +0000 Subject: [PATCH] Fix problems with elts when immediate mode is on. --- src/mesa/drivers/dri/r300/r300_render.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index a8519ab..a4e8915 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -211,16 +211,19 @@ static int r300_get_num_verts(r300ContextPtr rmesa, static GLfloat default_vector[4]={0.0, 0.0, 0.0, 1.0}; -#define output_vector(v, i) \ - { \ +#define output_vector(v, i) { \ int _i; \ for(_i=0;_isize;_i++){ \ - efloat(VEC_ELT(v, GLfloat, i)[_i]); \ + if(VB->Elts){ \ + efloat(VEC_ELT(v, GLfloat, VB->Elts[i])[_i]); \ + }else{ \ + efloat(VEC_ELT(v, GLfloat, i)[_i]); \ } \ + } \ for(_i=v->size;_i<4;_i++){ \ - efloat(default_vector[_i]); \ - } \ - } + efloat(default_vector[_i]); \ + } \ +} /* Immediate implementation - vertex data is sent via command stream */ @@ -506,9 +509,6 @@ static GLboolean r300_run_vb_render(GLcontext *ctx, e32(0x00000003); r300EmitState(rmesa); - if(hw_tcl_on) /* FIXME */ - r300FlushCmdBuf(rmesa, __FUNCTION__); - rmesa->state.Elts = VB->Elts; for(i=0; i < VB->PrimitiveCount; i++){ -- 2.7.4