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 */
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 */
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 */
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 */
int
fxDDInitFxMesaContext(fxMesaContext fxMesa)
{
- int i;
GLcontext *ctx = fxMesa->glCtx;
FX_setupGrVertexLayout();
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 */
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) {
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");
}
/* This might be a proxy texture. */
if (!tObj->Palette.Table)
- return;
+ return;
if (!tObj->DriverData)
tObj->DriverData = fxAllocTexObjData(fxMesa);
ti = fxTMGetTexInfo(tObj);
}
+#if 0 /* break glass in case of emergency */
static void
PrintTexture(int w, int h, int c, const GLubyte * data)
{
fprintf(stderr, "\n");
}
}
+#endif
const struct gl_texture_format *
width, height, 1,
format, type, pixels, packing);
}
-
+
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
GLint mipWidth, mipHeight;
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) {
#include "fxdrv.h"
-GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass);
+static GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass);
/*
* 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);
}
-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;
}
-static void
+static void
fx_fallback_line( fxMesaContext fxMesa,
GrVertex *v0,
GrVertex *v1 )
}
-static void
-fx_fallback_point( fxMesaContext fxMesa,
+static void
+fx_fallback_point( fxMesaContext fxMesa,
GrVertex *v0 )
{
GLcontext *ctx = fxMesa->glCtx;
#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");
}
grDrawVertexArrayContiguous( GR_LINE_STRIP, count-j,
fxVB + j, sizeof(GrVertex));
- if (flags & PRIM_END)
+ if (flags & PRIM_END)
grDrawLine( fxVB + (count - 1),
fxVB + start );
static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
GLuint,
GLuint,
- GLuint) =
+ GLuint) =
{
fx_render_vb_points,
fx_render_vb_lines,
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.
-static void fxRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void fxRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
GLuint n )
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);
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;
}
}
-static void fxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void fxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
GLuint n )
{
int i;
-/* Determine the rasterized primitive when not drawing unfilled
+/* Determine the rasterized primitive when not drawing unfilled
* polygons.
*/
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 );
}
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.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;
}
/* [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;