[Mesa-dev] [PATCH 06/15] i965: Prepare slice validator for isl based miptrees
Nanley Chery
nanleychery at gmail.com
Wed Jun 14 22:45:14 UTC 2017
On Tue, Jun 13, 2017 at 05:50:04PM +0300, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> index 8479b285cb..0b85bc12ef 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> @@ -748,7 +748,13 @@ intel_miptree_check_level_layer(const struct intel_mipmap_tree *mt,
>
> assert(level >= mt->first_level);
> assert(level <= mt->last_level);
> - assert(layer < mt->level[level].depth);
> +
> + if (mt->surf.size > 0)
> + assert(layer < (mt->surf.dim == ISL_SURF_DIM_3D ?
> + mt->surf.phys_level0_sa.depth :
Shouldn't we be minifying the depth here?
> + mt->surf.phys_level0_sa.array_len));
> + else
> + assert(layer < mt->level[level].depth);
> }
>
> void intel_miptree_reference(struct intel_mipmap_tree **dst,
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list