[Mesa-dev] [PATCH 08/12] intel/blorp: Allow multiple layers

Jason Ekstrand jason at jlekstrand.net
Thu Sep 1 15:37:45 UTC 2016


On Aug 31, 2016 9:06 AM, "Topi Pohjolainen" <topi.pohjolainen at intel.com>
wrote:
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/intel/blorp/blorp.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
> index 4dbba01..17c1ff4 100644
> --- a/src/intel/blorp/blorp.c
> +++ b/src/intel/blorp/blorp.c
> @@ -119,6 +119,9 @@ brw_blorp_surface_info_init(struct blorp_context
*blorp,
>        },
>     };
>
> +   info->view.array_len = MAX2(info->surf.logical_level0_px.depth,

You need to minify here which apparently I forgot to do as well.  Now, it
will matter though.

> +                               info->surf.logical_level0_px.array_len);
> +
>     if (!is_render_target &&
>         (info->surf.dim == ISL_SURF_DIM_3D ||
>          info->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)) {
> @@ -128,12 +131,12 @@ brw_blorp_surface_info_init(struct blorp_context
*blorp,
>         * guaranteed that we won't be doing any funny surface hacks.
>         */
>        info->view.base_array_layer = 0;
> -      info->view.array_len = MAX2(info->surf.logical_level0_px.depth,
> -
info->surf.logical_level0_px.array_len);
>        info->z_offset = layer / layer_multiplier;
>     } else {
>        info->view.base_array_layer = layer / layer_multiplier;
> -      info->view.array_len = 1;
> +
> +      assert(info->view.array_len >= info->view.base_array_layer);
> +      info->view.array_len -= info->view.base_array_layer;
>        info->z_offset = 0;
>     }
>  }
> --
> 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/20160901/d397e85f/attachment.html>


More information about the mesa-dev mailing list