summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-12-06 13:32:31 -0500
committerRob Clark <[email protected]>2016-12-27 16:54:01 -0500
commitf0439040808f81d5b9a4072de7469dacdda96fa7 (patch)
tree5288836c478a20f93e0a9f7cff28e15b2675b46d /src/gallium/drivers
parent859cb24d94f3b0b7f8f0e98642ff4b92b1f7f2f1 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_texture.c2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c2
2 files changed, 2 insertions, 2 deletions
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;