intel: Use the parent miptree's format for setting up HiZ miptrees.
authorEric Anholt <eric@anholt.net>
Thu, 20 Dec 2012 19:36:38 +0000 (11:36 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 26 Dec 2012 20:02:47 +0000 (12:02 -0800)
This worked out before because the parent was always 4 bytes so it
didn't affect the layout, but now we want to support Z16 too.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c

index 580d0215d49092091169f592a1b2b892e45b28d6..9ae7bcccb1907acb7b8b876f1adfd89127f89ad2 100644 (file)
@@ -857,7 +857,7 @@ intel_miptree_alloc_hiz(struct intel_context *intel,
    /* MSAA HiZ surfaces always use IMS layout. */
    mt->hiz_mt = intel_miptree_create(intel,
                                      mt->target,
-                                     MESA_FORMAT_X8_Z24,
+                                     mt->format,
                                      mt->first_level,
                                      mt->last_level,
                                      mt->width0,