Mesa (master): radeonsi/gfx9: honor user stride for imported buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 11 15:04:52 UTC 2019


Module: Mesa
Branch: master
Commit: 9a59ad87df9ae2e804dd878ebb011f5835702ea7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a59ad87df9ae2e804dd878ebb011f5835702ea7

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Aug 30 17:55:27 2019 -0400

radeonsi/gfx9: honor user stride for imported buffers

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/gallium/drivers/radeonsi/si_texture.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 		}




More information about the mesa-commit mailing list