diff options
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 23 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxtexman.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxtris.c | 53 |
4 files changed, 45 insertions, 44 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index f0f4e03a34..4ab4b6421f 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1096,9 +1096,9 @@ fxDDDrawPixels555 (GLcontext * ctx, GLint x, GLint y, FRAGPROG_BIT)) || fxMesa->fallback) { - _swrast_DrawPixels( ctx, x, y, width, height, format, type, + _swrast_DrawPixels( ctx, x, y, width, height, format, type, unpack, pixels ); - return; + return; } /* make sure the pixelpipe is configured correctly */ @@ -1231,9 +1231,9 @@ fxDDDrawPixels565 (GLcontext * ctx, GLint x, GLint y, FRAGPROG_BIT)) || fxMesa->fallback) { - _swrast_DrawPixels( ctx, x, y, width, height, format, type, + _swrast_DrawPixels( ctx, x, y, width, height, format, type, unpack, pixels ); - return; + return; } /* make sure the pixelpipe is configured correctly */ @@ -1366,9 +1366,9 @@ fxDDDrawPixels565_rev (GLcontext * ctx, GLint x, GLint y, FRAGPROG_BIT)) || fxMesa->fallback) { - _swrast_DrawPixels( ctx, x, y, width, height, format, type, + _swrast_DrawPixels( ctx, x, y, width, height, format, type, unpack, pixels ); - return; + return; } /* make sure the pixelpipe is configured correctly */ @@ -1501,9 +1501,9 @@ fxDDDrawPixels8888 (GLcontext * ctx, GLint x, GLint y, FRAGPROG_BIT)) || fxMesa->fallback) { - _swrast_DrawPixels( ctx, x, y, width, height, format, type, + _swrast_DrawPixels( ctx, x, y, width, height, format, type, unpack, pixels ); - return; + return; } /* make sure the pixelpipe is configured correctly */ @@ -1676,7 +1676,6 @@ static const struct tnl_pipeline_stage *fx_pipeline[] = { int fxDDInitFxMesaContext(fxMesaContext fxMesa) { - int i; GLcontext *ctx = fxMesa->glCtx; FX_setupGrVertexLayout(); @@ -1774,7 +1773,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa) ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureImageUnits = fxMesa->haveTwoTMUs ? 2 : 1; ctx->Const.MaxTextureUnits = MAX2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits); - + fxMesa->new_state = _NEW_ALL; if (!fxMesa->haveHwStencil) { /* don't touch stencil if there is none */ @@ -2094,7 +2093,7 @@ fx_check_IsInHardware(GLcontext * ctx) static void fxDDUpdateDDPointers(GLcontext * ctx, GLuint new_state) { - /* TNLcontext *tnl = TNL_CONTEXT(ctx);*/ + /* TNLcontext *tnl = TNL_CONTEXT(ctx); */ fxMesaContext fxMesa = FX_CONTEXT(ctx); if (TDFX_DEBUG & VERBOSE_DRIVER) { @@ -2116,7 +2115,7 @@ void fxSetupDDPointers(GLcontext * ctx) { fxMesaContext fxMesa = FX_CONTEXT(ctx); - TNLcontext *tnl = TNL_CONTEXT(ctx); + /* TNLcontext *tnl = TNL_CONTEXT(ctx); */ if (TDFX_DEBUG & VERBOSE_DRIVER) { fprintf(stderr, "fxSetupDDPointers()\n"); diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index 4ccf8da719..e7b7ec3198 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -580,7 +580,7 @@ fxDDTexPalette(GLcontext * ctx, struct gl_texture_object *tObj) } /* This might be a proxy texture. */ if (!tObj->Palette.Table) - return; + return; if (!tObj->DriverData) tObj->DriverData = fxAllocTexObjData(fxMesa); ti = fxTMGetTexInfo(tObj); @@ -994,6 +994,7 @@ fetch_rgba_dxt5(const struct gl_texture_image *texImage, } +#if 0 /* break glass in case of emergency */ static void PrintTexture(int w, int h, int c, const GLubyte * data) { @@ -1009,6 +1010,7 @@ PrintTexture(int w, int h, int c, const GLubyte * data) fprintf(stderr, "\n"); } } +#endif const struct gl_texture_format * @@ -1435,7 +1437,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, width, height, 1, format, type, pixels, packing); } - + /* GL_SGIS_generate_mipmap */ if (level == texObj->BaseLevel && texObj->GenerateMipmap) { GLint mipWidth, mipHeight; @@ -1443,9 +1445,9 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, struct gl_texture_image *mipImage; const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; const GLint maxLevels = _mesa_max_texture_levels(ctx, texObj->Target); - + assert(!texImage->IsCompressed); - + while (level < texObj->MaxLevel && level < maxLevels - 1) { mipWidth = width / 2; if (!mipWidth) { diff --git a/src/mesa/drivers/glide/fxtexman.c b/src/mesa/drivers/glide/fxtexman.c index d83c7e3a62..b43b40e385 100644 --- a/src/mesa/drivers/glide/fxtexman.c +++ b/src/mesa/drivers/glide/fxtexman.c @@ -233,9 +233,8 @@ fxTMFindStartAddr(fxMesaContext fxMesa, GLint tmu, int size) int fxTMCheckStartAddr (fxMesaContext fxMesa, GLint tmu, tfxTexInfo *ti) { - MemRange *prev, *tmp; + MemRange *tmp; int size; - struct gl_texture_object *obj; if (fxMesa->HaveTexUma) { return FXTRUE; diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c index 1b5c869872..180637565c 100644 --- a/src/mesa/drivers/glide/fxtris.c +++ b/src/mesa/drivers/glide/fxtris.c @@ -45,7 +45,7 @@ #include "fxdrv.h" -GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass); +static GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass); /* @@ -140,13 +140,13 @@ do { \ * Fallback to swrast for basic primitives * ***********************************************************************/ -/* Build an SWvertex from a hardware vertex. +/* Build an SWvertex from a hardware vertex. * * This code is hit only when a mix of accelerated and unaccelerated * primitives are being drawn, and only for the unaccelerated - * primitives. + * primitives. */ -static void +static void fx_translate_vertex( GLcontext *ctx, const GrVertex *src, SWvertex *dst) { fxMesaContext fxMesa = FX_CONTEXT(ctx); @@ -201,10 +201,10 @@ fx_translate_vertex( GLcontext *ctx, const GrVertex *src, SWvertex *dst) } -static void -fx_fallback_tri( fxMesaContext fxMesa, - GrVertex *v0, - GrVertex *v1, +static void +fx_fallback_tri( fxMesaContext fxMesa, + GrVertex *v0, + GrVertex *v1, GrVertex *v2 ) { GLcontext *ctx = fxMesa->glCtx; @@ -217,7 +217,7 @@ fx_fallback_tri( fxMesaContext fxMesa, } -static void +static void fx_fallback_line( fxMesaContext fxMesa, GrVertex *v0, GrVertex *v1 ) @@ -230,8 +230,8 @@ fx_fallback_line( fxMesaContext fxMesa, } -static void -fx_fallback_point( fxMesaContext fxMesa, +static void +fx_fallback_point( fxMesaContext fxMesa, GrVertex *v0 ) { GLcontext *ctx = fxMesa->glCtx; @@ -256,7 +256,7 @@ static void fx_print_vertex( GLcontext *ctx, const GrVertex *v ) #else /* !FX_PACKEDCOLOR */ fprintf(stderr, "\tr %f g %f b %f a %f\n", v->r, v->g, v->b, v->a); #endif /* !FX_PACKEDCOLOR */ - + fprintf(stderr, "\n"); } @@ -1119,7 +1119,7 @@ static void fx_render_vb_line_loop( GLcontext *ctx, grDrawVertexArrayContiguous( GR_LINE_STRIP, count-j, fxVB + j, sizeof(GrVertex)); - if (flags & PRIM_END) + if (flags & PRIM_END) grDrawLine( fxVB + (count - 1), fxVB + start ); @@ -1306,7 +1306,7 @@ static void fx_render_vb_noop( GLcontext *ctx, static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *, GLuint, GLuint, - GLuint) = + GLuint) = { fx_render_vb_points, fx_render_vb_lines, @@ -1361,8 +1361,8 @@ static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *, const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ (void) elt; -#define RESET_STIPPLE -#define RESET_OCCLUSION +#define RESET_STIPPLE +#define RESET_OCCLUSION #define PRESERVE_VB_DEFS /* Elts, no clipping. @@ -1389,7 +1389,7 @@ static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *, -static void fxRenderClippedPoly( GLcontext *ctx, const GLuint *elts, +static void fxRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n ) { fxMesaContext fxMesa = FX_CONTEXT(ctx); @@ -1397,12 +1397,12 @@ static void fxRenderClippedPoly( GLcontext *ctx, const GLuint *elts, struct vertex_buffer *VB = &tnl->vb; GLuint prim = fxMesa->render_primitive; - /* Render the new vertices as an unclipped polygon. + /* Render the new vertices as an unclipped polygon. */ { GLuint *tmp = VB->Elts; VB->Elts = (GLuint *)elts; - tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, PRIM_BEGIN|PRIM_END ); VB->Elts = tmp; } @@ -1414,7 +1414,7 @@ static void fxRenderClippedPoly( GLcontext *ctx, const GLuint *elts, } -static void fxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, +static void fxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n ) { int i; @@ -1612,7 +1612,7 @@ static void fxRasterPrimitive( GLcontext *ctx, GLenum prim ) -/* Determine the rasterized primitive when not drawing unfilled +/* Determine the rasterized primitive when not drawing unfilled * polygons. */ static void fxRenderPrimitive( GLcontext *ctx, GLenum prim ) @@ -1624,7 +1624,7 @@ static void fxRenderPrimitive( GLcontext *ctx, GLenum prim ) if (rprim == GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) return; - + if (fxMesa->raster_primitive != rprim) { fxRasterPrimitive( ctx, rprim ); } @@ -1691,7 +1691,7 @@ void fxCheckIsInHardware( GLcontext *ctx ) tnl->Driver.Render.Start = fxCheckTexSizes; tnl->Driver.Render.Finish = fxRenderFinish; tnl->Driver.Render.PrimitiveNotify = fxRenderPrimitive; - tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon; + tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon; tnl->Driver.Render.ClippedLine = _tnl_RenderClippedLine; tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; @@ -1729,14 +1729,14 @@ void fxDDInitTriFuncs( GLcontext *ctx ) tnl->Driver.Render.Start = fxCheckTexSizes; tnl->Driver.Render.Finish = fxRenderFinish; tnl->Driver.Render.PrimitiveNotify = fxRenderPrimitive; - tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon; + tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon; tnl->Driver.Render.ClippedLine = _tnl_RenderClippedLine; tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; tnl->Driver.Render.BuildVertices = fxBuildVertices; tnl->Driver.Render.Multipass = NULL; - + (void) fx_print_vertex; } @@ -1744,7 +1744,8 @@ void fxDDInitTriFuncs( GLcontext *ctx ) /* [dBorca] Hack alert: * doesn't work with blending. */ -GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass) +static GLboolean +fxMultipass_ColorSum (GLcontext *ctx, GLuint pass) { fxMesaContext fxMesa = FX_CONTEXT(ctx); tfxUnitsState *us = &fxMesa->unitsState; |