iris: set strides on transfers
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 10 Feb 2018 06:46:28 +0000 (22:46 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_resource.c

index 6773eeddf7dac2232abee8649ef38ea28e1b03ee..93855741f84764484d7d3abf2abd413c0497e3c8 100644 (file)
@@ -389,8 +389,8 @@ iris_transfer_map(struct pipe_context *ctx,
    transfer->level = level;
    transfer->usage = usage;
    transfer->box = *box;
-   transfer->stride = 1;
-   transfer->layer_stride = 1;
+   transfer->stride = isl_surf_get_row_pitch_B(&res->surf);
+   transfer->layer_stride = isl_surf_get_array_pitch(&res->surf);
    *ptransfer = transfer;
 
    if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&