Mesa (master): swrast: don't try to do depth testing if there' s no depth buffer
Brian Paul
brianp at kemper.freedesktop.org
Thu Aug 11 14:53:57 UTC 2011
Module: Mesa
Branch: master
Commit: 37a64baea87c470a68f9b2582af86783eb3509c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=37a64baea87c470a68f9b2582af86783eb3509c4
Author: Brian Paul <brianp at vmware.com>
Date: Thu Aug 11 08:52:41 2011 -0600
swrast: don't try to do depth testing if there's no depth buffer
Fixes piglit hiz-depth-stencil-test-fbo-d0-s8 crash.
See http://bugs.freedesktop.org/show_bug.cgi?id=37907
NOTE: This is a candidate for the 7.11 branch.
---
src/mesa/swrast/s_stencil.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 5bec71c..fa5093a 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -462,7 +462,8 @@ stencil_and_ztest_span(struct gl_context *ctx, SWspan *span, GLuint face)
* Some fragments passed the stencil test, apply depth test to them
* and apply Zpass and Zfail stencil ops.
*/
- if (ctx->Depth.Test == GL_FALSE) {
+ if (ctx->Depth.Test == GL_FALSE ||
+ ctx->DrawBuffer->_DepthBuffer == NULL) {
/*
* No depth buffer, just apply zpass stencil function to active pixels.
*/
More information about the mesa-commit
mailing list