From: Rob Clark Date: Tue, 6 Dec 2016 18:32:31 +0000 (-0500) Subject: freedreno/a5xx: texture layout X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0439040808f81d5b9a4072de7469dacdda96fa7;p=mesa.git freedreno/a5xx: texture layout Seems to be imilar to a4xx, and sampler state "array-pitch" needs to be aligned to page size. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c index 588e914b0cc..47b07b8cd4e 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c @@ -281,7 +281,7 @@ fd5_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, case PIPE_TEXTURE_1D: case PIPE_TEXTURE_2D: so->texconst3 = - A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->slices[lvl].size0); + A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->layer_size); so->texconst5 = A5XX_TEX_CONST_5_DEPTH(1); break; diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 174c1d48ce8..5a2bdfc6651 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -819,7 +819,7 @@ fd_resource_create(struct pipe_screen *pscreen, assert(rsc->cpp); alignment = slice_alignment(pscreen, tmpl); - if (is_a4xx(fd_screen(pscreen))) { + if (is_a4xx(fd_screen(pscreen)) || is_a5xx(fd_screen(pscreen))) { switch (tmpl->target) { case PIPE_TEXTURE_3D: rsc->layer_first = false;