From 3c40656abc5083bc83883638f989750f6c4ea076 Mon Sep 17 00:00:00 2001 From: Roland Baer Date: Tue, 7 Aug 2007 12:33:18 +0300 Subject: [PATCH] Fixed wrong logic That if statement can't be true. As it is a check for that enum range, adjusted to what it seams to be intended. --- src/mesa/shader/atifragshader.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index 4727c1a..854c911 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -440,7 +440,7 @@ _mesa_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle) _mesa_error(ctx, GL_INVALID_OPERATION, "glPassTexCoordATI(coord)"); return; } - if ((swizzle < GL_SWIZZLE_STR_ATI) && (swizzle > GL_SWIZZLE_STQ_DQ_ATI)) { + if (!(swizzle >= GL_SWIZZLE_STR_ATI) && (swizzle <= GL_SWIZZLE_STQ_DQ_ATI)) { _mesa_error(ctx, GL_INVALID_ENUM, "glPassTexCoordATI(swizzle)"); return; } @@ -513,7 +513,7 @@ _mesa_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle) _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMapATI(interp)"); return; } - if ((swizzle < GL_SWIZZLE_STR_ATI) && (swizzle > GL_SWIZZLE_STQ_DQ_ATI)) { + if (!(swizzle >= GL_SWIZZLE_STR_ATI) && (swizzle <= GL_SWIZZLE_STQ_DQ_ATI)) { _mesa_error(ctx, GL_INVALID_ENUM, "glSampleMapATI(swizzle)"); return; } -- 1.5.2.3