Module: Mesa Branch: staging/23.0 Commit: 792e54d0a4dee67681cf5de020dd786a2b54cb9e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=792e54d0a4dee67681cf5de020dd786a2b54cb9e
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Tue Mar 28 18:31:05 2023 +0200 radeonsi: don't use alignment_log2 of imported buffers This value isn't passed to the importer by the kernel so we can't check it. Fixes: f7a4051b836 ("radeonsi: Check pitch and offset for validity.") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8431 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22170> (cherry picked from commit 9c90deefb2356c970520a404375b0e1796df1535) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_texture.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 5f9cb20b438..9846d78ceec 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1606,7 +1606,7 @@ "description": "radeonsi: don't use alignment_log2 of imported buffers", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f7a4051b836294ab8f55c71d239e99c5cbf63170" }, diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index d5905189f97..ae03869c526 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1638,8 +1638,7 @@ static struct pipe_resource *si_texture_from_winsys_buffer(struct si_screen *ssc } if (ac_surface_get_plane_offset(sscreen->info.gfx_level, &tex->surface, 0, 0) + - tex->surface.total_size > buf->size || - buf->alignment_log2 < tex->surface.alignment_log2) { + tex->surface.total_size > buf->size) { si_texture_reference(&tex, NULL); return NULL; }
