diff options
Diffstat (limited to 'src/mesa/drivers/glide/fxvb.c')
-rw-r--r-- | src/mesa/drivers/glide/fxvb.c | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c index 22128e61f6b..3138d59649d 100644 --- a/src/mesa/drivers/glide/fxvb.c +++ b/src/mesa/drivers/glide/fxvb.c @@ -238,10 +238,10 @@ static tfxSetupFunc setupfuncs[MAX_SETUP]; static void -fxsetup_invalid( GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) +fxsetup_invalid( GLcontext *ctx, GLuint start, GLuint end ) { fprintf(stderr, "fxMesa: invalid setup function\n"); - (void) (ctx && start && end && newinputs); + (void) (ctx && start && end); } @@ -334,43 +334,49 @@ void fx_BuildProjVerts( GLcontext *ctx, GLuint start, GLuint count, { fxMesaContext fxMesa = FX_CONTEXT(ctx); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint ind = fxMesa->setup_gone; - fxMesa->setup_gone = 0; + if (newinputs == ~0) { + /* build interpolated vertices */ + setupfuncs[fxMesa->setupindex]( ctx, start, count ); + } else { + GLuint ind = fxMesa->setup_gone; + fxMesa->setup_gone = 0; - if (newinputs & VERT_CLIP) - ind = fxMesa->setupindex; /* clipmask has changed - invalidated all */ - else { - if (newinputs & VERT_TEX0) - ind |= fxMesa->tex_dest[0]; + if (newinputs & VERT_CLIP) + ind = fxMesa->setupindex; /* clipmask has potentially changed */ + else { + if (newinputs & VERT_TEX0) + ind |= fxMesa->tex_dest[0]; - if (newinputs & VERT_TEX1) - ind |= fxMesa->tex_dest[1]; - - if (newinputs & VERT_RGBA) - ind |= SETUP_RGBA; - - ind &= fxMesa->setupindex; - } + if (newinputs & VERT_TEX1) + ind |= fxMesa->tex_dest[1]; - if (0) { - _tnl_print_vert_flags("newinputs", newinputs); - fxPrintSetupFlags("setup function", ind); - } + if (newinputs & VERT_RGBA) + ind |= SETUP_RGBA; - if (fxMesa->new_state) - fxSetupFXUnits( ctx ); + ind &= fxMesa->setupindex; + } - if (VB->importable_data) - VB->import_data( ctx, VB->importable_data & newinputs, - (VB->ClipOrMask - ? VEC_NOT_WRITEABLE|VEC_BAD_STRIDE - : VEC_BAD_STRIDE)); + if (0) { + _tnl_print_vert_flags("newinputs", newinputs); + fxPrintSetupFlags("setup function", ind); + } - setupfuncs[ind]( ctx, start, count, newinputs ); + if (ind) { + if (fxMesa->new_state) + fxSetupFXUnits( ctx ); + + if (VB->importable_data) + VB->import_data( ctx, VB->importable_data & newinputs, + (VB->ClipOrMask + ? VEC_NOT_WRITEABLE|VEC_BAD_STRIDE + : VEC_BAD_STRIDE)); + + setupfuncs[ind]( ctx, start, count ); + } + } } - void fxAllocVB( GLcontext *ctx ) { fxMesaContext fxMesa = FX_CONTEXT(ctx); |