From 3e94fd34449210c8b548a2a30f248fb5bd73478b Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Mon, 5 Jul 2004 06:47:17 +0000 Subject: added GL_ARB_point_sprite. color masking correctly implemented for 15bpp. small fixes for textures and tri engine. --- src/mesa/drivers/glide/fxddtex.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/glide/fxddtex.c') diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index f433c573d4..4c498b59cc 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -171,8 +171,9 @@ fxDDTexEnv(GLcontext * ctx, GLenum target, GLenum pname, /* apply any lod biasing right now */ if (pname == GL_TEXTURE_LOD_BIAS_EXT) { GLfloat bias = *param; - CLAMP_SELF(bias, -8.0, 7.75); - + CLAMP_SELF(bias, -ctx->Const.MaxTextureLodBias, + ctx->Const.MaxTextureLodBias - 0.25); + grTexLodBiasValue(GR_TMU0, bias); if (fxMesa->haveTwoTMUs) { @@ -296,6 +297,7 @@ fxDDTexParam(GLcontext * ctx, GLenum target, struct gl_texture_object *tObj, case GL_MIRRORED_REPEAT: ti->sClamp = GR_TEXTURECLAMP_MIRROR_EXT; break; + case GL_CLAMP_TO_BORDER: /* no-no, but don't REPEAT, either */ case GL_CLAMP_TO_EDGE: /* CLAMP discarding border */ case GL_CLAMP: ti->sClamp = GR_TEXTURECLAMP_CLAMP; @@ -314,6 +316,7 @@ fxDDTexParam(GLcontext * ctx, GLenum target, struct gl_texture_object *tObj, case GL_MIRRORED_REPEAT: ti->tClamp = GR_TEXTURECLAMP_MIRROR_EXT; break; + case GL_CLAMP_TO_BORDER: /* no-no, but don't REPEAT, either */ case GL_CLAMP_TO_EDGE: /* CLAMP discarding border */ case GL_CLAMP: ti->tClamp = GR_TEXTURECLAMP_CLAMP; @@ -1591,6 +1594,7 @@ fxDDCompressedTexImage2D (GLcontext *ctx, GLenum target, * our data aligned inside a 8:1 rectangle. * 3) just in case if MIN("s", "t") gets overflowed with GL_REPEAT, * we replicate the data over the padded area. + * For now, we take 2) + 3) but texelfetchers will be wrong! */ GLuint srcRowStride = _mesa_compressed_row_stride(internalFormat, width); @@ -1601,7 +1605,7 @@ fxDDCompressedTexImage2D (GLcontext *ctx, GLenum target, destRowStride, (mml->height+3) / 4, 1, data, srcRowStride, texImage->Data); - + ti->padded = GL_TRUE; } else { MEMCPY(texImage->Data, data, texImage->CompressedSize); } -- cgit v1.2.3