From: Marek Olšák Date: Fri, 30 Aug 2019 21:55:27 +0000 (-0400) Subject: radeonsi/gfx9: honor user stride for imported buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a59ad87df9ae2e804dd878ebb011f5835702ea7;p=mesa.git radeonsi/gfx9: honor user stride for imported buffers Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index f2d0a10a843..f376930d682 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -344,6 +344,8 @@ static int si_init_surface(struct si_screen *sscreen, if (sscreen->info.chip_class >= GFX9) { if (pitch) { surface->u.gfx9.surf_pitch = pitch; + if (ptex->last_level == 0) + surface->u.gfx9.surf.epitch = pitch - 1; surface->u.gfx9.surf_slice_size = (uint64_t)pitch * surface->u.gfx9.surf_height * bpe; }