From adfa778c8ea436d6e62c37327b44f6ff359ed63f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 14:19:06 -0600 Subject: mesa: remove rgbMode check in enable_texture() If the currently bound FBO isn't yet validated it's possible for rgbMode to be zero so we'll lose the texture enable. This could fix some FBO rendering glitches, but I don't know of any specific instances. --- src/mesa/main/enable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index f432be183c..47d19ab932 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -231,7 +231,7 @@ enable_texture(GLcontext *ctx, GLboolean state, GLbitfield bit) const GLuint newenabled = (!state) ? (texUnit->Enabled & ~bit) : (texUnit->Enabled | bit); - if (!ctx->DrawBuffer->Visual.rgbMode || texUnit->Enabled == newenabled) + if (texUnit->Enabled == newenabled) return GL_FALSE; FLUSH_VERTICES(ctx, _NEW_TEXTURE); -- cgit v1.2.3 From 60b152a1b366b1c9b9326dda1d91ab600fbb0d86 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 14:24:14 -0600 Subject: mesa: remove glEnable(GL_DEPTH_BOUNDS_TEST_EXT) check/warning At the time of the enable there may not be a Z buffer, but one may be attached to the FBO later. --- src/mesa/main/enable.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 47d19ab932..d1b21756fe 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -933,11 +933,6 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state) /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: CHECK_EXTENSION(EXT_depth_bounds_test, cap); - if (state && ctx->DrawBuffer->Visual.depthBits == 0) { - _mesa_warning(ctx, - "glEnable(GL_DEPTH_BOUNDS_TEST_EXT) but no depth buffer"); - return; - } if (ctx->Depth.BoundsTest == state) return; FLUSH_VERTICES(ctx, _NEW_DEPTH); -- cgit v1.2.3