[Mesa-dev] [PATCH] i965/skl: Use more compact hiz dimensions

Anuj Phogat anuj.phogat at gmail.com
Thu Jun 25 10:13:28 PDT 2015


On Wed, Jun 24, 2015 at 8:07 PM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
> gen8 had some special restrictions which don't seem to carry over to gen9.
> Quoting the spec for SKL:
> "The Z_Height and Z_Width values must equal those present in
> 3DSTATE_DEPTH_BUFFER incremented by one."
>
> This fixes nothing in piglit (and regresses nothing).
>
> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 32 ++++++++++++++-------------
>  1 file changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 6aa969a..432a47c 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -1550,21 +1550,23 @@ intel_gen8_hiz_buf_create(struct brw_context *brw,
>     /* Gen7 PRM Volume 2, Part 1, 11.5.3 "Hierarchical Depth Buffer" documents
>      * adjustments required for Z_Height and Z_Width based on multisampling.
>      */
> -   switch (mt->num_samples) {
> -   case 0:
> -   case 1:
> -      break;
> -   case 2:
> -   case 4:
> -      z_width *= 2;
> -      z_height *= 2;
> -      break;
> -   case 8:
> -      z_width *= 4;
> -      z_height *= 2;
> -      break;
> -   default:
> -      unreachable("unsupported sample count");
> +   if (brw->gen < 9) {
> +      switch (mt->num_samples) {
> +      case 0:
> +      case 1:
> +         break;
> +      case 2:
> +      case 4:
> +         z_width *= 2;
> +         z_height *= 2;
> +         break;
> +      case 8:
> +         z_width *= 4;
> +         z_height *= 2;
> +         break;
> +      default:
> +         unreachable("unsupported sample count");
> +      }
>     }
>
>     const unsigned vertical_align = 8; /* 'j' in the docs */
> --
> 2.4.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list