gallium/util: check nr_samples in pipe_surface_equal()

this is otherwise broken

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34367>
This commit is contained in:
Mike Blumenkrantz 2025-04-03 10:45:04 -04:00 committed by Marge Bot
parent a530890e75
commit 12b57b34f8

View file

@ -426,6 +426,7 @@ pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2)
{
return s1->texture == s2->texture &&
s1->format == s2->format &&
s1->nr_samples == s2->nr_samples &&
(s1->texture->target != PIPE_BUFFER ||
(s1->u.buf.first_element == s2->u.buf.first_element &&
s1->u.buf.last_element == s2->u.buf.last_element)) &&