v3d: Fix stride of 1D_ARRAY mappings.
authorEric Anholt <eric@anholt.net>
Wed, 11 Jul 2018 18:11:34 +0000 (11:11 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 12 Jul 2018 18:31:08 +0000 (11:31 -0700)
All of our other texture arrays will be tiled, but 1D is an array of
raster mappings and we had the wrong value plugged in here.  Fixes piglit
getteximage-targets 1D_ARRAY

src/gallium/drivers/v3d/v3d_resource.c

index cd49c1af52bc7ba67fccef1bc1fa19e02cbf6bc0..74d49b4d810044924cb6d2101881c09ea99be843 100644 (file)
@@ -281,7 +281,7 @@ v3d_resource_transfer_map(struct pipe_context *pctx,
                 return trans->map;
         } else {
                 ptrans->stride = slice->stride;
-                ptrans->layer_stride = ptrans->stride;
+                ptrans->layer_stride = rsc->cube_map_stride;
 
                 return buf + slice->offset +
                         ptrans->box.y * ptrans->stride +