mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
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:
parent
ba6336ce3e
commit
9c90deefb2
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue