[Mesa-dev] [PATCH 1/5] etnaviv: stop oversizing buffer resources

Wladimir J. van der Laan laanwj at gmail.com
Wed May 10 18:03:07 UTC 2017


Good catch!

Reviewed-By: Wladimir J. van der Laan <laanwj at gmail.com>

On Wed, May 10, 2017 at 06:01:04PM +0200, Lucas Stach wrote:
> PIPE_BUFFER is a target enum, not a binding. This caused the driver to
> up-align the height of buffer resources, leading to largely oversizing
> those resources. This is especially bad, as the buffer resources used
> by the upload manager are already 1MB in size. Height alignment meant
> that those would result in 4 to 8MB big BOs.
> 
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
>  src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index 0e37345c0c0a..26f2ed733498 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -180,7 +180,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
>                          &paddingY, &halign);
>     assert(paddingX && paddingY);
>  
> -   if (templat->bind != PIPE_BUFFER) {
> +   if (templat->target != PIPE_BUFFER) {
>        unsigned min_paddingY = 4 * screen->specs.pixel_pipes;
>        if (paddingY < min_paddingY)
>           paddingY = min_paddingY;
> -- 
> 2.11.0
> 
> _______________________________________________
> etnaviv mailing list
> etnaviv at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv


More information about the mesa-dev mailing list