zink: ensure transient surface is created when doing msaa expand

forgetting this can lead to res->transient being NULL

Fixes: ef3f798957 ("zink: prune zink_surface down to the imageview and create/fetch on demand")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37257>
(cherry picked from commit 7c1c2f8fce)
This commit is contained in:
Mike Blumenkrantz 2025-09-09 13:40:03 -04:00 committed by Eric Engestrom
parent d9094cf0cd
commit 9517120528
2 changed files with 2 additions and 1 deletions

View file

@ -6744,7 +6744,7 @@
"description": "zink: ensure transient surface is created when doing msaa expand",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "ef3f7989574332758b962b990f1808b27e611cdb",
"notes": null

View file

@ -188,6 +188,7 @@ zink_render_msaa_expand(struct zink_context *ctx, uint32_t msaa_expand_mask)
bool blitting = ctx->blitting;
u_foreach_bit(i, msaa_expand_mask) {
zink_create_transient_surface(ctx, &ctx->fb_state.cbufs[i], ctx->fb_state.cbufs[i].nr_samples);
struct pipe_resource *src = ctx->fb_state.cbufs[i].texture;
struct zink_resource *res = zink_resource(src);
struct zink_resource *transient = res->transient;