From 6f37e76272a3a4b3898426b943304d1c5903d0ee Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Thu, 17 Feb 2005 22:07:32 +0000 Subject: Fixing *lots* of warning messages, especially concerning unportable whitespace before preprocessor commands. Please, can you try to keep the warnings down? Try running make with make -s sometime to see just how bad an offender the current code is. --- src/mesa/drivers/dri/r300/r300_tex.c | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/mesa/drivers/dri/r300/r300_tex.c') diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index 0f3089d4c8..000b7be0b0 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -60,16 +60,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * \param swrap Wrap mode for the \a s texture coordinate * \param twrap Wrap mode for the \a t texture coordinate */ - + static void r300SetTexWrap(r300TexObjPtr t, GLenum swrap, GLenum twrap, GLenum rwrap) { GLboolean is_clamp = GL_FALSE; unsigned long hw_swrap=0, hw_twrap=0, hw_qwrap=0; - + t->filter &= ~(R300_TX_WRAP_S_MASK | R300_TX_WRAP_T_MASK | R300_TX_WRAP_Q_MASK); - + switch (swrap) { case GL_REPEAT: hw_swrap |= R300_TX_REPEAT; @@ -162,20 +162,20 @@ static void r300SetTexWrap(r300TexObjPtr t, GLenum swrap, GLenum twrap, default: _mesa_problem(NULL, "bad R wrap mode in %s", __FUNCTION__); } - + t->filter |= hw_swrap << R300_TX_WRAP_S_SHIFT; t->filter |= hw_twrap << R300_TX_WRAP_T_SHIFT; t->filter |= hw_qwrap << R300_TX_WRAP_Q_SHIFT; - + #if 0 t->format_x &= ~R200_CLAMP_Q_MASK; t->border_fallback = (is_clamp && is_clamp_to_border); -#endif +#endif } static void r300SetTexMaxAnisotropy(r300TexObjPtr t, GLfloat max) { - + t->filter &= ~R300_TX_MAX_ANISO_MASK; if (max <= 1.0) { @@ -204,10 +204,10 @@ static void r300SetTexFilter(r300TexObjPtr t, GLenum minf, GLenum magf) GLuint anisotropy = (t->filter & R300_TX_MAX_ANISO_MASK); t->filter &= ~(R300_TX_MIN_FILTER_MASK | R300_TX_MAG_FILTER_MASK); -#if 0 +#if 0 //t->format_x &= ~R200_VOLUME_FILTER_MASK; -#endif - +#endif + if (anisotropy == R300_TX_MAX_ANISO_1_TO_1) { switch (minf) { case GL_NEAREST: @@ -316,16 +316,16 @@ static const struct gl_texture_format *r300ChooseTextureFormat(GLcontext * ctx, const GLboolean force16bpt = (rmesa->texture_depth == DRI_CONF_TEXTURE_DEPTH_FORCE_16); (void)format; - - #if 0 - fprintf(stderr, "InternalFormat=%s(%d) type=%s format=%s\n", + +#if 0 + fprintf(stderr, "InternalFormat=%s(%d) type=%s format=%s\n", _mesa_lookup_enum_by_nr(internalFormat), internalFormat, _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format)); - fprintf(stderr, "do32bpt=%d force16bpt=%d\n", + fprintf(stderr, "do32bpt=%d force16bpt=%d\n", do32bpt, force16bpt); - #endif - +#endif + switch (internalFormat) { case 4: case GL_RGBA: @@ -809,7 +809,7 @@ static void r300TexEnv(GLcontext * ctx, GLenum target, fprintf(stderr, "%s( %s )\n", __FUNCTION__, _mesa_lookup_enum_by_nr(pname)); } - + /* This is incorrect: Need to maintain this data for each of * GL_TEXTURE_{123}D, GL_TEXTURE_RECTANGLE_NV, etc, and switch * between them according to _ReallyEnabled. @@ -844,12 +844,12 @@ static void r300TexEnv(GLcontext * ctx, GLenum target, driQueryOptionb(&rmesa->radeon.optionCache, "no_neg_lod_bias") ? 0.0 : -16.0; bias = CLAMP(bias, min, 16.0); - + /* 0.0 - 16.0 == 0x0 - 0x1000 */ /* 0.0 - -16.0 == 0x1001 - 0x1fff */ b = 0x1000 / 16.0 * bias; b &= R300_LOD_BIAS_MASK; - + if(b != (rmesa->hw.tex.unknown1.cmd[R300_TEX_VALUE_0+unit] & R300_LOD_BIAS_MASK)){ R300_STATECHANGE(rmesa, tex.unknown1); rmesa->hw.tex.unknown1.cmd[R300_TEX_VALUE_0+unit] &= ~R300_LOD_BIAS_MASK; @@ -974,10 +974,10 @@ static void r300TexGen(GLcontext * ctx, { r300ContextPtr rmesa = R300_CONTEXT(ctx); GLuint unit = ctx->Texture.CurrentUnit; - #if 0 /* Disable this for now - looks like we will be recalculating everything +#if 0 /* Disable this for now - looks like we will be recalculating everything anyway */ rmesa->recheck_texgen[unit] = GL_TRUE; - #endif +#endif } /** -- cgit v1.2.3