diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-12-09 09:48:37 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-12-10 08:52:16 +0100 |
commit | e3e91cebcd9307654eb3535e2f6521103ec8b997 (patch) | |
tree | a44ec7b992aa7ae28d864eead131338043e22367 /src/gallium/drivers/radeonsi | |
parent | ff0f10866699a22216fd1a4af6cdb89c2fea10e1 (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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_texture.c | 6 |
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 de3cbb2bb88..474bc00f8c4 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1722,10 +1722,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; |