summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-08-30 17:55:27 -0400
committerMarek Olšák <[email protected]>2019-09-11 11:03:31 -0400
commit9a59ad87df9ae2e804dd878ebb011f5835702ea7 (patch)
treef9ea42c741168ae079fc8b526237c147055f3b54 /src/gallium
parentb97c5edd7aa31fb531a330742a9e20064591fec2 (diff)
radeonsi/gfx9: honor user stride for imported buffers
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_texture.c2
1 files changed, 2 insertions, 0 deletions
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;
}