Mesa (master): mesa: remove GL_DEPTH_TEST + no depth buffer test

Brian Paul brianp at kemper.freedesktop.org
Fri Jan 16 20:34:42 UTC 2009


Module: Mesa
Branch: master
Commit: 12c6d28cc7ef36a27389003e9898b512b6f722f9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=12c6d28cc7ef36a27389003e9898b512b6f722f9

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Jan 16 13:25:41 2009 -0700

mesa: remove GL_DEPTH_TEST + no depth buffer test

One could enable depth testing before binding an FBO that has a depth buffer
so this test is no longer useful or correct.

---

 src/mesa/main/enable.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 160a6fc..dae576a 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -341,10 +341,6 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
          ctx->Transform.CullVertexFlag = state;
          break;
       case GL_DEPTH_TEST:
-         if (state && ctx->DrawBuffer->Visual.depthBits == 0) {
-            _mesa_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer");
-            return;
-         }
          if (ctx->Depth.Test == state)
             return;
          FLUSH_VERTICES(ctx, _NEW_DEPTH);




More information about the mesa-commit mailing list