radeonsi: force linear for textures with height=1 (gfx6-8)

addrlib will force it only for level = 0, so force it when we create
a height=1/multi-level texture.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2250
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6775>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-09-18 12:25:16 +02:00 committed by Marge Bot
parent 5f27777379
commit c58b46edf0

View file

@ -1263,7 +1263,7 @@ static enum radeon_surf_mode si_choose_tiling(struct si_screen *sscreen,
if (templ->target == PIPE_TEXTURE_1D || templ->target == PIPE_TEXTURE_1D_ARRAY ||
/* Only very thin and long 2D textures should benefit from
* linear_aligned. */
(templ->width0 > 8 && templ->height0 <= 2))
templ->height0 <= 2)
return RADEON_SURF_MODE_LINEAR_ALIGNED;
/* Textures likely to be mapped often. */