zink: verify that surface exists when adding implicit feedback loop

this can be null if multiple contexts are in use

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34557>
(cherry picked from commit de6efc01c1)
This commit is contained in:
Mike Blumenkrantz 2025-04-16 11:01:30 -04:00 committed by Eric Engestrom
parent 45aa964eb8
commit 8a4f7476d7
2 changed files with 2 additions and 2 deletions

View file

@ -2604,7 +2604,7 @@
"description": "zink: verify that surface exists when adding implicit feedback loop",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -5660,7 +5660,7 @@ add_implicit_feedback_loop(struct zink_context *ctx, struct zink_resource *res)
psurf = ctx->fb_state.zsbuf;
else
psurf = ctx->fb_state.cbufs[idx];
if (psurf->texture == &res->base.b)
if (psurf && psurf->texture == &res->base.b)
psurfs[surf_idx++] = psurf;
}