[Mesa-dev] [PATCH] etnaviv: add useful information to BO import errors

Christian Gmeiner christian.gmeiner at gmail.com
Tue Feb 13 17:54:25 UTC 2018


2018-02-12 15:25 GMT+01:00 Lucas Stach <l.stach at pengutronix.de>:
> From: Philipp Zabel <p.zabel at pengutronix.de>
>
> Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>

> ---
>  src/gallium/drivers/etnaviv/etnaviv_resource.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index d70152e082dd..4365947a1573 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -535,11 +535,15 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
>      * The stride of the BO must be greater or equal to our padded
>      * stride. The size of the BO must accomodate the padded height. */
>     if (level->stride < util_format_get_stride(tmpl->format, level->padded_width)) {
> -      BUG("BO stride is too small for RS engine width padding");
> +      BUG("BO stride %u is too small for RS engine width padding (%u, format %s)",
> +          level->stride, util_format_get_stride(tmpl->format, level->padded_width),
> +          util_format_name(tmpl->format));
>        goto fail;
>     }
>     if (etna_bo_size(rsc->bo) < level->stride * level->padded_height) {
> -      BUG("BO size is too small for RS engine height padding");
> +      BUG("BO size %u is too small for RS engine height padding (%u, format %s)",
> +          etna_bo_size(rsc->bo), level->stride * level->padded_height,
> +          util_format_name(tmpl->format));
>        goto fail;
>     }
>
> --
> 2.15.1
>
> _______________________________________________
> etnaviv mailing list
> etnaviv at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv



-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info


More information about the mesa-dev mailing list