Mesa (mesa_7_7_branch): softpipe: Skip depth testing for PIPE_S8_UNORM.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Jan 19 04:34:56 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 65fa11959f118a75a82d1e432df0b635d316889f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=65fa11959f118a75a82d1e432df0b635d316889f

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Jan 18 19:33:13 2010 -0800

softpipe: Skip depth testing for PIPE_S8_UNORM.

---

 src/gallium/drivers/softpipe/sp_quad_depth_test.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
index 0ca86c4..03f569d 100644
--- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c
+++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
@@ -667,6 +667,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
    }
 
    if (qs->softpipe->framebuffer.zsbuf && 
+       pf_get_component_bits(qs->softpipe->framebuffer.zsbuf->format, PIPE_FORMAT_COMP_Z) &&
        (qs->softpipe->depth_stencil->depth.enabled ||
         qs->softpipe->depth_stencil->stencil[0].enabled)) {
 
@@ -885,6 +886,7 @@ choose_depth_test(struct quad_stage *qs,
    boolean alpha = qs->softpipe->depth_stencil->alpha.enabled;
 
    boolean depth = (qs->softpipe->framebuffer.zsbuf && 
+                    pf_get_component_bits(qs->softpipe->framebuffer.zsbuf->format, PIPE_FORMAT_COMP_Z) &&
                     qs->softpipe->depth_stencil->depth.enabled);
 
    unsigned depthfunc = qs->softpipe->depth_stencil->depth.func;
@@ -895,7 +897,6 @@ choose_depth_test(struct quad_stage *qs,
 
    boolean occlusion = qs->softpipe->active_query_count;
 
-
    if (!alpha &&
        !depth &&
        !stencil) {




More information about the mesa-commit mailing list