summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2019-12-09 09:48:37 +0100
committerDylan Baker <dylan@pnwbakers.com>2019-12-10 09:14:34 -0800
commit01d53f7ac0a0ccbb0fe76177a05f7a3a53d99be8 (patch)
tree3df903e59e0f93e535e6abac198c4b2e830838a1
parent166a3ae3c894d0ee2b660b7bbf2d6eee47eaa6ff (diff)
radeonsi: fix multi plane buffers creation
When using 3 planes, the sequence produces this chain: plane0 -> plane2 This commit fixes this to produce: plane0 -> plane1 -> plane2 Fixes: 86e60bc2659 ("radeonsi: remove si_vid_join_surfaces and use combined planar allocations") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2193 Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit e3e91cebcd9307654eb3535e2f6521103ec8b997)
-rw-r--r--src/gallium/drivers/radeonsi/si_texture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index bbd87ee0b5f..95feabe99b7 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -1721,10 +1721,12 @@ struct pipe_resource *si_texture_create(struct pipe_screen *screen,
tex->plane_index = i;
tex->num_planes = num_planes;
- if (!last_plane)
+ if (!plane0) {
plane0 = last_plane = tex;
- else
+ } else {
last_plane->buffer.b.b.next = &tex->buffer.b.b;
+ last_plane = tex;
+ }
}
return (struct pipe_resource *)plane0;