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>
(cherry picked from commit 12b57b34f8)
This commit is contained in:
Mike Blumenkrantz 2025-04-03 10:45:04 -04:00 committed by Eric Engestrom
parent a64edc0e3b
commit c3952af96d
2 changed files with 2 additions and 1 deletions

View file

@ -544,7 +544,7 @@
"description": "gallium/util: check nr_samples in pipe_surface_equal()",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -304,6 +304,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)) &&