[Mesa-dev] [PATCH 09/27] i965/gen6: Remove dead code in hiz surface setup

Jason Ekstrand jason at jlekstrand.net
Fri Jan 20 19:24:48 UTC 2017


6-9 are

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Mon, Jan 16, 2017 at 1:13 AM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:

> In intel_hiz_miptree_buf_create() the miptree is unconditionally
> created with MIPTREE_LAYOUT_FORCE_ALL_SLICE_AT_LOD.
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/gen6_depth_state.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_depth_state.c
> b/src/mesa/drivers/dri/i965/gen6_depth_state.c
> index 0ff2407..cda66e8 100644
> --- a/src/mesa/drivers/dri/i965/gen6_depth_state.c
> +++ b/src/mesa/drivers/dri/i965/gen6_depth_state.c
> @@ -162,14 +162,13 @@ gen6_emit_depth_stencil_hiz(struct brw_context *brw,
>        if (hiz) {
>           assert(depth_mt);
>           struct intel_mipmap_tree *hiz_mt = depth_mt->hiz_buf->mt;
> -         uint32_t offset = 0;
>
> -         if (hiz_mt->array_layout == ALL_SLICES_AT_EACH_LOD) {
> -            offset = intel_miptree_get_aligned_offset(
> -                        hiz_mt,
> -                        hiz_mt->level[lod].level_x,
> -                        hiz_mt->level[lod].level_y);
> -         }
> +         assert(hiz_mt->array_layout == ALL_SLICES_AT_EACH_LOD);
> +
> +         const uint32_t offset = intel_miptree_get_aligned_offset(
> +                                    hiz_mt,
> +                                    hiz_mt->level[lod].level_x,
> +                                    hiz_mt->level[lod].level_y);
>
>          BEGIN_BATCH(3);
>          OUT_BATCH((_3DSTATE_HIER_DEPTH_BUFFER << 16) | (3 - 2));
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170120/5b17cf28/attachment.html>


More information about the mesa-dev mailing list