OSDN Git Service

Fix reversed enable logic in enable_texture
authorIan Romanick <idr@us.ibm.com>
Thu, 10 May 2007 22:00:41 +0000 (15:00 -0700)
committerIan Romanick <idr@us.ibm.com>
Thu, 10 May 2007 22:01:52 +0000 (15:01 -0700)
Fix bug inserted in commit c9e723e5013443df984cb3987ffa3a9ba3384b89.
Discovered by Oliver McFadden (z3ro).

src/mesa/main/enable.c

index 1cc8446..0e14345 100644 (file)
@@ -198,7 +198,7 @@ enable_texture(GLcontext *ctx, GLboolean state, GLbitfield bit)
 {
    const GLuint curr = ctx->Texture.CurrentUnit;
    struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
-   const GLuint newenabled = (state) 
+   const GLuint newenabled = (!state)
        ? (texUnit->Enabled & ~bit) :  (texUnit->Enabled | bit);
 
    if (!ctx->DrawBuffer->Visual.rgbMode || texUnit->Enabled == newenabled)