summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-11 09:22:00 -0700
committerBrian Paul <[email protected]>2009-12-11 09:22:00 -0700
commitb605f4ff11c894500f2d0273c5d4653ff413448d (patch)
tree144a2202677b29020bfb0477d145a985cae3c29f /src/mesa/main/texparam.c
parentda3bc492d2438ac915e720c17b54d0d12ffd8a97 (diff)
parent5076a4f53a2f34cc9116b45951037f639885c7a1 (diff)
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r--src/mesa/main/texparam.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 310d594cd55..db4c7a5edad 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -595,8 +595,10 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
case GL_DEPTH_TEXTURE_MODE_ARB:
{
/* convert float param to int */
- GLint p = (GLint) params[0];
- need_update = set_tex_parameteri(ctx, texObj, pname, &p);
+ GLint p[4];
+ p[0] = (GLint) params[0];
+ p[1] = p[2] = p[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, p);
}
break;
@@ -645,14 +647,21 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
case GL_TEXTURE_LOD_BIAS:
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
{
- GLfloat fparam = (GLfloat) param;
+ GLfloat fparam[4];
+ fparam[0] = (GLfloat) param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
/* convert int param to float */
- need_update = set_tex_parameterf(ctx, texObj, pname, &fparam);
+ need_update = set_tex_parameterf(ctx, texObj, pname, fparam);
}
break;
default:
/* this will generate an error if pname is illegal */
- need_update = set_tex_parameteri(ctx, texObj, pname, &param);
+ {
+ GLint iparam[4];
+ iparam[0] = param;
+ iparam[1] = iparam[2] = iparam[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, iparam);
+ }
}
if (ctx->Driver.TexParameter && need_update) {
@@ -694,8 +703,10 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
{
/* convert int param to float */
- GLfloat fparam = (GLfloat) params[0];
- need_update = set_tex_parameterf(ctx, texObj, pname, &fparam);
+ GLfloat fparams[4];
+ fparams[0] = (GLfloat) params[0];
+ fparams[1] = fparams[2] = fparams[3] = 0.0F;
+ need_update = set_tex_parameterf(ctx, texObj, pname, fparams);
}
break;
default: