aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-05-11 11:28:13 -0400
committerRob Clark <[email protected]>2016-05-11 12:03:21 -0400
commit4500d17245d0c4bd0b52bf444cf1d90bab932794 (patch)
tree63e720263d42bfe98d97add644ad3534bc344ec0 /src/gallium
parent9bea01899433ca6a8047b4172ffec6e89afe7625 (diff)
freedreno: fix multi-layer transfer_map's
The use of transfer_inline_write() in TexSubImage path (see fb9fe352ea4) exposed a bug for "layer_first" resources (ie. a4xx) not setting correct layer_stride. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 44558185a6b..ded81474331 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -299,7 +299,7 @@ fd_resource_transfer_map(struct pipe_context *pctx,
ptrans->usage = usage;
ptrans->box = *box;
ptrans->stride = util_format_get_nblocksx(format, slice->pitch) * rsc->cpp;
- ptrans->layer_stride = slice->size0;
+ ptrans->layer_stride = rsc->layer_first ? rsc->layer_size : slice->size0;
if (usage & PIPE_TRANSFER_READ)
op |= DRM_FREEDRENO_PREP_READ;