[Mesa-dev] [PATCH 2/2] softpipe: don't alpha test when integer color buffer.

Dave Airlie airlied at gmail.com
Sun Jan 29 08:35:36 PST 2012


From: Dave Airlie <airlied at redhat.com>

This helps pass one of the texture integer tests.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/softpipe/sp_quad_depth_test.c |    4 +++-
 1 files changed, 3 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 529a5ad..e0c1fe4 100644
--- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c
+++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
@@ -776,7 +776,9 @@ depth_test_quads_fallback(struct quad_stage *qs,
    data.use_shader_stencil_refs = FALSE;
 
    if (qs->softpipe->depth_stencil->alpha.enabled) {
-      nr = alpha_test_quads(qs, quads, nr);
+      if (!(qs->softpipe->framebuffer.nr_cbufs &&
+            util_format_is_pure_integer(qs->softpipe->framebuffer.cbufs[0]->format)))
+	 nr = alpha_test_quads(qs, quads, nr);
    }
 
    if (qs->softpipe->framebuffer.zsbuf &&
-- 
1.7.7.4



More information about the mesa-dev mailing list