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: f7a4051b83 ("radeonsi: Check pitch and offset for validity.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8431
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22170>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2023-03-28 18:31:05 +02:00 committed by Marge Bot
parent ba6336ce3e
commit 9c90deefb2

View file

@ -1646,8 +1646,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;
}