zink: always add mutable to transient surface creation when needed

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37743>
This commit is contained in:
Mike Blumenkrantz 2025-10-07 13:15:15 -04:00 committed by Marge Bot
parent 3d90a95ad3
commit 3cd3195d31

View file

@ -297,6 +297,8 @@ zink_create_transient_surface(struct zink_context *ctx, const struct pipe_surfac
rtempl.nr_samples = nr_samples; rtempl.nr_samples = nr_samples;
rtempl.bind &= ~(PIPE_BIND_LINEAR | ZINK_BIND_DMABUF); rtempl.bind &= ~(PIPE_BIND_LINEAR | ZINK_BIND_DMABUF);
rtempl.bind |= ZINK_BIND_TRANSIENT; rtempl.bind |= ZINK_BIND_TRANSIENT;
if (psurf->format != rtempl.format)
rtempl.bind |= ZINK_BIND_MUTABLE;
res->transient = zink_resource(ctx->base.screen->resource_create(ctx->base.screen, &rtempl)); res->transient = zink_resource(ctx->base.screen->resource_create(ctx->base.screen, &rtempl));
transient = res->transient; transient = res->transient;
if (unlikely(!transient)) { if (unlikely(!transient)) {