i965,iris: Delete misleading HiZ sampling comments
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 13 Nov 2020 14:50:55 +0000 (06:50 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 10 Feb 2021 20:48:01 +0000 (20:48 +0000)
One comment seems to suggest that MCS (which is needed for compressed
multisampling) can be used to sample from a multisampled depth buffer.
This is not the case. Multisampled depth buffers are sampled without an
auxiliary surface.

Another comment seems to suggest that some depth buffers don't have
corresponding levels in their HiZ buffers. Each main slice *should* have
a corresponding aux slice, but not all of these slices have equal
support for HiZ ops (e.g. ambiguates aren't really supported on
non-8x4-aligned slices).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853>

src/gallium/drivers/iris/iris_resolve.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index c66eddacf79dd0458be83b1dce26257631c3f5fe..86e108fc2723419e02f811bedf25fff52844ba70 100644 (file)
@@ -469,19 +469,12 @@ iris_sample_with_depth_aux(const struct gen_device_info *devinfo,
       return false;
    }
 
-   /* It seems the hardware won't fallback to the depth buffer if some of the
-    * mipmap levels aren't available in the HiZ buffer. So we need all levels
-    * of the texture to be HiZ enabled.
-    */
    for (unsigned level = 0; level < res->surf.levels; ++level) {
       if (!iris_resource_level_has_hiz(res, level))
          return false;
    }
 
-   /* If compressed multisampling is enabled, then we use it for the auxiliary
-    * buffer instead.
-    *
-    * From the BDW PRM (Volume 2d: Command Reference: Structures
+   /* From the BDW PRM (Volume 2d: Command Reference: Structures
     *                   RENDER_SURFACE_STATE.AuxiliarySurfaceMode):
     *
     *  "If this field is set to AUX_HIZ, Number of Multisamples must be
index 680723c07414bc4b11294e8540683859c82cc435..fb64e9850b119e2845412e1d58776b4325949480 100644 (file)
@@ -1636,19 +1636,12 @@ intel_miptree_sample_with_hiz(struct brw_context *brw,
       return false;
    }
 
-   /* It seems the hardware won't fallback to the depth buffer if some of the
-    * mipmap levels aren't available in the HiZ buffer. So we need all levels
-    * of the texture to be HiZ enabled.
-    */
    for (unsigned level = 0; level < mt->surf.levels; ++level) {
       if (!intel_miptree_level_has_hiz(mt, level))
          return false;
    }
 
-   /* If compressed multisampling is enabled, then we use it for the auxiliary
-    * buffer instead.
-    *
-    * From the BDW PRM (Volume 2d: Command Reference: Structures
+   /* From the BDW PRM (Volume 2d: Command Reference: Structures
     *                   RENDER_SURFACE_STATE.AuxiliarySurfaceMode):
     *
     *  "If this field is set to AUX_HIZ, Number of Multisamples must be