Module: Mesa Branch: master Commit: 4c6882c09007c6f7b1d4f1224e61ac2e0ac5882c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c6882c09007c6f7b1d4f1224e61ac2e0ac5882c
Author: Nanley Chery <[email protected]> Date: Fri Nov 13 06:50:55 2020 -0800 i965,iris: Delete misleading HiZ sampling comments 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853> --- src/gallium/drivers/iris/iris_resolve.c | 9 +-------- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index c66eddacf79..86e108fc272 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -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 diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 680723c0741..fb64e9850b1 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
