summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texstate.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index f27c346ec2f..9359c7b1b19 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -2154,9 +2154,14 @@ _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
{
GLfloat p[4];
p[0] = (GLfloat) params[0];
- p[1] = (GLfloat) params[1];
- p[2] = (GLfloat) params[2];
- p[3] = (GLfloat) params[3];
+ if (pname == GL_TEXTURE_GEN_MODE) {
+ p[1] = p[2] = p[3] = 0.0F;
+ }
+ else {
+ p[1] = (GLfloat) params[1];
+ p[2] = (GLfloat) params[2];
+ p[3] = (GLfloat) params[3];
+ }
_mesa_TexGenfv(coord, pname, p);
}
@@ -2174,9 +2179,14 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
{
GLfloat p[4];
p[0] = (GLfloat) params[0];
- p[1] = (GLfloat) params[1];
- p[2] = (GLfloat) params[2];
- p[3] = (GLfloat) params[3];
+ if (pname == GL_TEXTURE_GEN_MODE) {
+ p[1] = p[2] = p[3] = 0.0F;
+ }
+ else {
+ p[1] = (GLfloat) params[1];
+ p[2] = (GLfloat) params[2];
+ p[3] = (GLfloat) params[3];
+ }
_mesa_TexGenfv( coord, pname, p );
}