freedreno/a5xx: correct image/ssbo offset

Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
Rob Clark 2018-06-05 09:50:26 -04:00
parent 132e5b0b34
commit e9fc9c16c9

View file

@ -84,7 +84,7 @@ static void translate_image(struct fd5_image *img, struct pipe_image_view *pimg)
img->array_pitch = 0;
} else {
lvl = pimg->u.tex.level;
img->offset = rsc->slices[lvl].offset;
img->offset = fd_resource_offset(rsc, lvl, pimg->u.tex.first_layer);
img->pitch = rsc->slices[lvl].pitch * rsc->cpp;
img->array_pitch = rsc->layer_size;
}