zink: clamp renderpass layers better

this needs to be the minimum layer, not the maximum

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17061>
(cherry picked from commit bd859e1f96)
This commit is contained in:
Mike Blumenkrantz 2022-06-15 13:00:35 -04:00 committed by Dylan Baker
parent 0c283ca156
commit dfea92f429
2 changed files with 2 additions and 2 deletions

View file

@ -877,7 +877,7 @@
"description": "zink: clamp renderpass layers better",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -188,7 +188,7 @@ zink_get_framebuffer_imageless(struct zink_context *ctx)
state.num_attachments += num_resolves;
state.width = MAX2(ctx->fb_state.width, 1);
state.height = MAX2(ctx->fb_state.height, 1);
state.layers = MAX2(util_framebuffer_get_num_layers(&ctx->fb_state), 1) - 1;
state.layers = MAX2(zink_framebuffer_get_num_layers(&ctx->fb_state), 1) - 1;
state.samples = ctx->fb_state.samples - 1;
struct zink_framebuffer *fb;