zink: use correct layer count when creating framebuffer

pipe_framebuffer_state::layers doesn't necessarily reflect the value we
need to use here, so we can use the util function to verify

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6263>
This commit is contained in:
Mike Blumenkrantz 2020-06-14 00:37:52 -04:00 committed by Marge Bot
parent e30367a273
commit 9ce1e99913
1 changed files with 1 additions and 1 deletions

View File

@ -494,7 +494,7 @@ create_framebuffer(struct zink_context *ctx)
state.width = ctx->fb_state.width;
state.height = ctx->fb_state.height;
state.layers = MAX2(ctx->fb_state.layers, 1);
state.layers = MAX2(util_framebuffer_get_num_layers(&ctx->fb_state), 1);
state.samples = ctx->fb_state.samples;
return zink_create_framebuffer(ctx, screen, &state);