summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxvb.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-01-05 02:26:48 +0000
committerKeith Whitwell <[email protected]>2001-01-05 02:26:48 +0000
commit58e991705392a2e17a1c8b034f4083a0adaf1943 (patch)
tree828804ca2671809e92a10642030ecd2d21a27b6d /src/mesa/drivers/glide/fxvb.c
parentf22c04cdaec47dfef1068af0e90822062478631b (diff)
Remove 'pv' parameter from Line/Tri/Point funcs. The provoking vertex
is always the last vertex parameter. Modify clipping to preserve pv colors. Modify swrast and X11 driver to expect the pv in the last vertex (was looking in the first vertex previously). Remove all handling of flatshading from swrast_setup. Allow drivers to override the unclipped render tabs in tnl_render_stage directly. (Like in 3.4). Removed fxsimplerender stage. Modified t_vb_rendertmp.h to remove the need for 'parity' arguments in RENDER_TRI macros.
Diffstat (limited to 'src/mesa/drivers/glide/fxvb.c')
-rw-r--r--src/mesa/drivers/glide/fxvb.c66
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);