Signed-off-by: Rob Clark <robdclark@gmail.com>
case PIPE_TEXTURE_CUBE:
case PIPE_TEXTURE_CUBE_ARRAY:
img->array_pitch = rsc->layer_size;
- img->depth = layers / 6;
+ img->depth = layers;
break;
case PIPE_TEXTURE_3D:
img->array_pitch = rsc->slices[lvl].size0;
* stride:
*/
dims[off + 1] = rsc->slices[lvl].pitch * rsc->cpp;
- dims[off + 2] = rsc->slices[lvl].size0;
+ /* see corresponding logic in fd_resource_offset(): */
+ if (rsc->layer_first) {
+ dims[off + 2] = rsc->layer_size;
+ } else {
+ dims[off + 2] = rsc->slices[lvl].size0;
+ }
}
}