freedreno: fix layer_stride
authorRob Clark <robclark@freedesktop.org>
Wed, 15 Oct 2014 14:29:17 +0000 (10:29 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 15 Oct 2014 19:49:48 +0000 (15:49 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_resource.c

index 6391dd10fc9081eab6884077bfa8e294b00ce38f..b6b39f00db068b6edc4736ad6683e956bf84459d 100644 (file)
@@ -116,7 +116,7 @@ fd_resource_transfer_map(struct pipe_context *pctx,
        ptrans->usage = usage;
        ptrans->box = *box;
        ptrans->stride = slice->pitch * rsc->cpp;
-       ptrans->layer_stride = ptrans->stride;
+       ptrans->layer_stride = slice->size0;
 
        if (usage & PIPE_TRANSFER_READ)
                op |= DRM_FREEDRENO_PREP_READ;