[Mesa-dev] [PATCH] r600g: use LINEAR_ALIGNED tiling for 1D array textures and if height0 <= 3

Alex Deucher alexdeucher at gmail.com
Tue Nov 13 07:33:56 PST 2012


linear_aligned may even be a better fit for 1D textures since we only
care about one dimension.

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

On Tue, Nov 13, 2012 at 10:05 AM, Marek Olšák <maraeo at gmail.com> wrote:
> ---
>  src/gallium/drivers/r600/r600_texture.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
> index 42010bf..0054c5b 100644
> --- a/src/gallium/drivers/r600/r600_texture.c
> +++ b/src/gallium/drivers/r600/r600_texture.c
> @@ -509,7 +509,9 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
>                 if (!(templ->bind & PIPE_BIND_SCANOUT) &&
>                     templ->usage != PIPE_USAGE_STAGING &&
>                     templ->usage != PIPE_USAGE_STREAM &&
> -                   templ->target != PIPE_TEXTURE_1D) {
> +                   templ->target != PIPE_TEXTURE_1D &&
> +                   templ->target != PIPE_TEXTURE_1D_ARRAY &&
> +                   templ->height0 > 3) {
>                         array_mode = V_038000_ARRAY_2D_TILED_THIN1;
>                 } else if (util_format_is_compressed(templ->format)) {
>                         array_mode = V_038000_ARRAY_1D_TILED_THIN1;
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list