v3d: do not rebind a sampler view already rebound

As sampler view can be used multiple times, do not attempt to rebind if
it was already bound.

This fixes a crash when replaying half-life-2-v2.trace.

Backport-to: 24.2
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31049>
This commit is contained in:
Juan A. Suarez Romero 2024-09-12 12:02:46 +02:00 committed by Marge Bot
parent c84be162a1
commit 8338e2082e
2 changed files with 5 additions and 1 deletions

View File

@ -233,7 +233,7 @@ traces:
label: [skip, timeout]
checksum: 512c305e645e2ec62d94976d86f42f1b
broadcom-rpi5:
label: [crash]
label: [skip, timeout]
checksum: 512c305e645e2ec62d94976d86f42f1b
valve/portal-2-v2.trace:

View File

@ -173,6 +173,10 @@ rebind_sampler_views(struct v3d_context *v3d,
struct v3d_sampler_view *sview =
v3d_sampler_view(psview);
if (sview->serial_id == rsc->serial_id)
continue;
struct v3d_device_info *devinfo =
&v3d->screen->devinfo;