From: Ian Romanick Date: Thu, 10 May 2007 22:00:41 +0000 (-0700) Subject: Fix reversed enable logic in enable_texture X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64a6a50155e665c2b81e9d70ce71cfd5f1fcaef1;p=mesa.git Fix reversed enable logic in enable_texture Fix bug inserted in commit c9e723e5013443df984cb3987ffa3a9ba3384b89. Discovered by Oliver McFadden (z3ro). --- diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 1cc84465922..0e14345e730 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -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)