diff options
author | Aapo Tahkola <aet@rasterburn.org> | 2005-06-16 10:27:04 +0000 |
---|---|---|
committer | Aapo Tahkola <aet@rasterburn.org> | 2005-06-16 10:27:04 +0000 |
commit | 463c1d6c57a3df87b57a74f9bdbd365eb99f2a42 (patch) | |
tree | 7518172568818d22ec54735fa4b7bdfb0e135c6f /src/mesa | |
parent | 0e288e58ef3325d10412dde29f5581a8a655b3dd (diff) |
Fix problems with elts when immediate mode is on.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_render.c | 18 |
1 files 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 a8519ab4df..a4e8915ad5 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;_i<v->size;_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++){ |