summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-07-30 17:15:50 -0600
committerBrian <brian@i915.localnet.net>2007-07-30 17:15:50 -0600
commit6558af67d380f2855b112ea3ce4dded9215c7cf7 (patch)
tree770abe1fbbadab61c0a623f11809fe0606ca1fbf /src/mesa/pipe/softpipe
parent09574bee850edec46d967b7cdbc2073f92b8223d (diff)
compute scale for Z24 buffers
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_depth_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_depth_test.c b/src/mesa/pipe/softpipe/sp_quad_depth_test.c
index d47c4c42b8..a26bd51d84 100644
--- a/src/mesa/pipe/softpipe/sp_quad_depth_test.c
+++ b/src/mesa/pipe/softpipe/sp_quad_depth_test.c
@@ -59,6 +59,8 @@ sp_depth_test_quad(struct quad_stage *qs, struct quad_header *quad)
*/
if (sps->surface.format == PIPE_FORMAT_U_Z16)
scale = 65535.0;
+ else if (sps->surface.format == PIPE_FORMAT_Z24_S8)
+ scale = (float) ((1 << 24) - 1);
else
assert(0); /* XXX fix this someday */