radeonsi: use gfx9.surf_offset to compute texture offset

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2177
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2019-12-06 21:35:38 +01:00
parent 6c901f0675
commit ff0f108666

View File

@@ -199,7 +199,8 @@ static unsigned si_texture_get_offset(struct si_screen *sscreen,
/* Each texture is an array of slices. Each slice is an array
* of mipmap levels. */
return box->z * tex->surface.u.gfx9.surf_slice_size +
return tex->surface.u.gfx9.surf_offset +
box->z * tex->surface.u.gfx9.surf_slice_size +
tex->surface.u.gfx9.offset[level] +
(box->y / tex->surface.blk_h *
tex->surface.u.gfx9.surf_pitch +