From: Brian Date: Mon, 30 Jul 2007 23:15:50 +0000 (-0600) Subject: compute scale for Z24 buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6558af67d380f2855b112ea3ce4dded9215c7cf7;p=mesa.git compute scale for Z24 buffers --- diff --git a/src/mesa/pipe/softpipe/sp_quad_depth_test.c b/src/mesa/pipe/softpipe/sp_quad_depth_test.c index d47c4c42b8f..a26bd51d846 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 */