summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-01-08 04:06:56 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-01-08 04:06:56 +0000
commit44d8de433e684cb4c2bc4dfc5cc6919af1f3cc55 (patch)
tree5aca3833a642fecf26946668f189a623d0f099ed
parente9bf776711b22ce336cd462adf534ad3e2d61eec (diff)
Bring the FX driver into line with core mesa changes.
-rw-r--r--src/mesa/drivers/glide/fxdd.c5
-rw-r--r--src/mesa/drivers/glide/fxtris.c31
-rw-r--r--src/mesa/drivers/glide/fxvb.c20
3 files changed, 30 insertions, 26 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index b36cbee47c..08285f67e8 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -1026,6 +1026,10 @@ static void fxDDUpdateDDPointers(GLcontext *ctx, GLuint new_state)
#endif
}
+static void fxDDRenderPrimitive( GLcontext *ctx, GLenum mode )
+{
+ (void) ctx; (void) mode;
+}
void fxSetupDDPointers(GLcontext *ctx)
@@ -1061,6 +1065,7 @@ void fxSetupDDPointers(GLcontext *ctx)
ctx->Driver.RenderStart=fxSetupFXUnits;
ctx->Driver.RenderFinish=_swrast_flush;
ctx->Driver.ResetLineStipple=_swrast_ResetLineStipple;
+ ctx->Driver.RenderPrimitive=fxDDRenderPrimitive;
ctx->Driver.TexImage2D = fxDDTexImage2D;
ctx->Driver.TexSubImage2D = fxDDTexSubImage2D;
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 11072a2601..b2864dbb8e 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -457,19 +457,6 @@ fx_null_tri( GLcontext *ctx,
-#define POINT_FALLBACK (DD_POINT_SMOOTH )
-#define LINE_FALLBACK (DD_LINE_STIPPLE)
-#define TRI_FALLBACK (DD_TRI_SMOOTH | DD_TRI_STIPPLE )
-#define ANY_FALLBACK (POINT_FALLBACK | LINE_FALLBACK | TRI_FALLBACK)
-
-
-#define ANY_RENDER_FLAGS (DD_FLATSHADE | \
- DD_TRI_LIGHT_TWOSIDE | \
- DD_TRI_OFFSET | \
- DD_TRI_UNFILLED)
-
-
-
/**********************************************************************/
/* Render whole begin/end objects */
@@ -518,6 +505,24 @@ fx_null_tri( GLcontext *ctx,
#include "tnl/t_vb_rendertmp.h"
+/**********************************************************************/
+/* Choose render functions */
+/**********************************************************************/
+
+
+
+
+#define POINT_FALLBACK (DD_POINT_SMOOTH )
+#define LINE_FALLBACK (DD_LINE_STIPPLE)
+#define TRI_FALLBACK (DD_TRI_SMOOTH | DD_TRI_STIPPLE )
+#define ANY_FALLBACK (POINT_FALLBACK | LINE_FALLBACK | TRI_FALLBACK)
+
+
+#define ANY_RENDER_FLAGS (DD_FLATSHADE | \
+ DD_TRI_LIGHT_TWOSIDE | \
+ DD_TRI_OFFSET | \
+ DD_TRI_UNFILLED)
+
/* Setup the Point, Line, Triangle and Quad functions based on the
diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c
index 3138d59649..d95cfca579 100644
--- a/src/mesa/drivers/glide/fxvb.c
+++ b/src/mesa/drivers/glide/fxvb.c
@@ -288,12 +288,13 @@ void fxDDSetupInit( void )
void fx_validate_BuildProjVerts(GLcontext *ctx, GLuint start, GLuint count,
GLuint newinputs )
{
- GLuint setupindex = SETUP_XYZW;
fxMesaContext fxMesa = (fxMesaContext)ctx->DriverCtx;
if (!fxMesa->is_in_hardware)
- ctx->Driver.BuildProjectedVertices = _swsetup_BuildProjectedVertices;
+ ctx->Driver.BuildProjectedVertices = _swsetup_BuildProjectedVertices;
else {
+ GLuint setupindex = SETUP_XYZW;
+
fxMesa->tmu_source[0] = 0;
fxMesa->tmu_source[1] = 1;
fxMesa->tex_dest[0] = SETUP_TMU0;
@@ -357,20 +358,13 @@ void fx_BuildProjVerts( GLcontext *ctx, GLuint start, GLuint count,
ind &= fxMesa->setupindex;
}
- if (0) {
- _tnl_print_vert_flags("newinputs", newinputs);
- fxPrintSetupFlags("setup function", ind);
- }
-
if (ind) {
if (fxMesa->new_state)
- fxSetupFXUnits( ctx );
-
- if (VB->importable_data)
+ fxSetupFXUnits( ctx ); /* why? */
+
+ if (VB->importable_data & newinputs)
VB->import_data( ctx, VB->importable_data & newinputs,
- (VB->ClipOrMask
- ? VEC_NOT_WRITEABLE|VEC_BAD_STRIDE
- : VEC_BAD_STRIDE));
+ VEC_BAD_STRIDE );
setupfuncs[ind]( ctx, start, count );
}