summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxsetup.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-11-24 10:25:05 +0000
committerKeith Whitwell <[email protected]>2000-11-24 10:25:05 +0000
commitad2ac216fa0cbebc36530bf9e5256e902710b892 (patch)
tree2b44b0129679558d0a1760bf94d75bcdbfe145ad /src/mesa/drivers/glide/fxsetup.c
parent00608a79dce1ea5e274f35b0a1883f7b623b9d7a (diff)
Support for swappable t&l modules, including an example one in the FX
driver (enable with FX_ALLOW_VTXFMT=t).
Diffstat (limited to 'src/mesa/drivers/glide/fxsetup.c')
-rw-r--r--src/mesa/drivers/glide/fxsetup.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index a5af36ca41d..f4fde1214ef 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -69,7 +69,7 @@ static void fxSetupBlend(GLcontext *ctx);
static void fxSetupDepthTest(GLcontext *ctx);
static void fxSetupScissor(GLcontext *ctx);
static void fxSetupCull(GLcontext *ctx);
-static void gl_print_fx_state_flags( const char *msg, GLuint flags);
+static void fx_print_state_flags( const char *msg, GLuint flags);
/*static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint);*/
static GLboolean fxMultipassTexture( struct vertex_buffer *, GLuint );
@@ -1181,7 +1181,6 @@ void fxDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor)
us->blendSrcFuncRGB=sfact;
us->blendSrcFuncAlpha=asfact;
fxMesa->new_state |= FX_NEW_BLEND;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
switch(dfactor) {
@@ -1235,7 +1234,6 @@ void fxDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor)
us->blendDstFuncRGB=dfact;
us->blendDstFuncAlpha=adfact;
fxMesa->new_state |= FX_NEW_BLEND;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
}
@@ -1296,13 +1294,11 @@ void fxDDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref)
if(newfunc!=us->alphaTestFunc) {
us->alphaTestFunc=newfunc;
fxMesa->new_state |= FX_NEW_ALPHA;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
if(ctx->Color.AlphaRef!=us->alphaTestRefValue) {
us->alphaTestRefValue=ctx->Color.AlphaRef;
fxMesa->new_state |= FX_NEW_ALPHA;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
}
@@ -1363,7 +1359,6 @@ void fxDDDepthFunc(GLcontext *ctx, GLenum func)
if(dfunc!=us->depthTestFunc) {
us->depthTestFunc=dfunc;
fxMesa->new_state |= FX_NEW_DEPTH;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
}
@@ -1376,7 +1371,6 @@ void fxDDDepthMask(GLcontext *ctx, GLboolean flag)
if(flag!=us->depthMask) {
us->depthMask=flag;
fxMesa->new_state |= FX_NEW_DEPTH;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
}
@@ -1405,7 +1399,6 @@ void fxDDColorMask(GLcontext *ctx,
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
fxMesa->new_state |= FX_NEW_COLOR_MASK;
- ctx->Driver.RenderStart = fxSetupFXUnits;
(void) r; (void) g; (void) b; (void) a;
}
@@ -1482,7 +1475,6 @@ static void fxSetupFog(GLcontext *ctx)
void fxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params )
{
FX_CONTEXT(ctx)->new_state |= FX_NEW_FOG;
- ctx->Driver.RenderStart = fxSetupFXUnits; /* XXX why is this here? */
}
/************************************************************************/
@@ -1528,7 +1520,6 @@ static void fxSetupScissor(GLcontext *ctx)
void fxDDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
{
FX_CONTEXT(ctx)->new_state |= FX_NEW_SCISSOR;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
/************************************************************************/
@@ -1540,14 +1531,12 @@ void fxDDCullFace(GLcontext *ctx, GLenum mode)
{
(void) mode;
FX_CONTEXT(ctx)->new_state |= FX_NEW_CULL;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
void fxDDFrontFace(GLcontext *ctx, GLenum mode)
{
(void) mode;
FX_CONTEXT(ctx)->new_state |= FX_NEW_CULL;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
@@ -1597,21 +1586,18 @@ void fxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
if(state!=us->alphaTestEnabled) {
us->alphaTestEnabled=state;
fxMesa->new_state |= FX_NEW_ALPHA;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
break;
case GL_BLEND:
if(state!=us->blendEnabled) {
us->blendEnabled=state;
fxMesa->new_state |= FX_NEW_BLEND;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
break;
case GL_DEPTH_TEST:
if(state!=us->depthTestEnabled) {
us->depthTestEnabled=state;
fxMesa->new_state |= FX_NEW_DEPTH;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
break;
case GL_DITHER:
@@ -1623,18 +1609,15 @@ void fxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
break;
case GL_SCISSOR_TEST:
fxMesa->new_state |= FX_NEW_SCISSOR;
- ctx->Driver.RenderStart = fxSetupFXUnits;
break;
case GL_SHARED_TEXTURE_PALETTE_EXT:
fxDDTexUseGlbPalette(ctx, state);
break;
case GL_FOG:
fxMesa->new_state |= FX_NEW_FOG;
- ctx->Driver.RenderStart = fxSetupFXUnits;
break;
case GL_CULL_FACE:
fxMesa->new_state |= FX_NEW_CULL;
- ctx->Driver.RenderStart = fxSetupFXUnits;
break;
case GL_LINE_SMOOTH:
case GL_LINE_STIPPLE:
@@ -1642,7 +1625,6 @@ void fxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
case GL_POLYGON_SMOOTH:
case GL_TEXTURE_2D:
fxMesa->new_state |= FX_NEW_TEXTURING;
- ctx->Driver.RenderStart = fxSetupFXUnits;
break;
default:
; /* XXX no-op? */
@@ -1781,7 +1763,6 @@ static GLboolean fxMultipassTexture( struct vertex_buffer *VB, GLuint pass )
void fxDDShadeModel(GLcontext *ctx, GLenum mode)
{
FX_CONTEXT(ctx)->new_state |= FX_NEW_TEXTURING;
- ctx->Driver.RenderStart = fxSetupFXUnits;
}
@@ -1789,7 +1770,7 @@ void fxDDShadeModel(GLcontext *ctx, GLenum mode)
/************************************************************************/
/****************************** Units SetUp *****************************/
/************************************************************************/
-static void gl_print_fx_state_flags( const char *msg, GLuint flags )
+static void fx_print_state_flags( const char *msg, GLuint flags )
{
fprintf(stderr,
"%s: (0x%x) %s%s%s%s%s%s%s\n",
@@ -1810,7 +1791,7 @@ void fxSetupFXUnits( GLcontext *ctx )
GLuint newstate = fxMesa->new_state;
if (MESA_VERBOSE&VERBOSE_DRIVER)
- gl_print_fx_state_flags("fxmesa: fxSetupFXUnits", newstate);
+ fx_print_state_flags("fxmesa: fxSetupFXUnits", newstate);
if (newstate) {
if (newstate & FX_NEW_TEXTURING)
@@ -1834,10 +1815,8 @@ void fxSetupFXUnits( GLcontext *ctx )
if (newstate & FX_NEW_COLOR_MASK)
fxSetupColorMask(ctx);
- if (newstate & FX_NEW_CULL) {
-
+ if (newstate & FX_NEW_CULL)
fxSetupCull(ctx);
- }
fxMesa->draw_point = fxMesa->initial_point;
fxMesa->draw_line = fxMesa->initial_line;
@@ -1855,6 +1834,7 @@ void fxSetupFXUnits( GLcontext *ctx )
* Need this to provide at least one external definition.
*/
+extern int gl_fx_dummy_function_setup(void);
int gl_fx_dummy_function_setup(void)
{
return 0;