[Mesa-dev] [PATCH 3/7] gallium/radeon: adjust the rule for using the LINEAR_ALIGNED layout
Nicolai Hähnle
nhaehnle at gmail.com
Tue Jan 24 19:26:31 UTC 2017
This patch breaks piglit
./bin/ext_image_dma_buf_import-refcount -auto -fbo
at least on Redwood. VI seems to be fine.
Nicolai
On 20.01.2017 20:07, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/gallium/drivers/radeon/r600_texture.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
> index cba4e7d..0b77c82 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -1177,21 +1177,23 @@ r600_choose_tiling(struct r600_common_screen *rscreen,
> if (rscreen->chip_class >= SI &&
> (templ->bind & PIPE_BIND_CURSOR))
> return RADEON_SURF_MODE_LINEAR_ALIGNED;
>
> if (templ->bind & PIPE_BIND_LINEAR)
> return RADEON_SURF_MODE_LINEAR_ALIGNED;
>
> /* Textures with a very small height are recommended to be linear. */
> if (templ->target == PIPE_TEXTURE_1D ||
> templ->target == PIPE_TEXTURE_1D_ARRAY ||
> - templ->height0 <= 4)
> + /* Only very thin and long 2D textures should benefit from
> + * linear_aligned. */
> + (templ->width0 > 8 && templ->height0 <= 2))
> return RADEON_SURF_MODE_LINEAR_ALIGNED;
>
> /* Textures likely to be mapped often. */
> if (templ->usage == PIPE_USAGE_STAGING ||
> templ->usage == PIPE_USAGE_STREAM)
> return RADEON_SURF_MODE_LINEAR_ALIGNED;
> }
>
> /* Make small textures 1D tiled. */
> if (templ->width0 <= 16 || templ->height0 <= 16 ||
>
More information about the mesa-dev
mailing list