mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 12:14:10 +08:00
zink: move variable decl up in unbind_fb_surface
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
This commit is contained in:
parent
ed343b415e
commit
4deba8cc96
@ -2580,6 +2580,7 @@ unbind_fb_surface(struct zink_context *ctx, struct pipe_surface *surf, unsigned
|
||||
if (!surf)
|
||||
return;
|
||||
struct zink_surface *transient = zink_transient_surface(surf);
|
||||
struct zink_resource *res = zink_resource(surf->texture);
|
||||
if (changed) {
|
||||
zink_fb_clears_apply(ctx, surf->texture);
|
||||
if (zink_batch_usage_exists(zink_csurface(surf)->batch_uses)) {
|
||||
@ -2589,7 +2590,6 @@ unbind_fb_surface(struct zink_context *ctx, struct pipe_surface *surf, unsigned
|
||||
}
|
||||
ctx->rp_changed = true;
|
||||
}
|
||||
struct zink_resource *res = zink_resource(surf->texture);
|
||||
res->fb_binds--;
|
||||
if (!res->fb_binds)
|
||||
check_resource_for_batch_ref(ctx, res);
|
||||
|
Loading…
Reference in New Issue
Block a user