zink: clamp dynamic render layerCount to 1

util function unhelpfully returns 0

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16656>
This commit is contained in:
Mike Blumenkrantz 2022-05-22 11:34:57 -04:00 committed by Marge Bot
parent c97aee426e
commit 65e5b589ef
1 changed files with 1 additions and 1 deletions

View File

@ -2589,7 +2589,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
ctx->dynamic_fb.info.renderArea.extent.width = state->width;
ctx->dynamic_fb.info.renderArea.extent.height = state->height;
ctx->dynamic_fb.info.colorAttachmentCount = ctx->fb_state.nr_cbufs;
unsigned layers = util_framebuffer_get_num_layers(state);
unsigned layers = MAX2(util_framebuffer_get_num_layers(state), 1);
ctx->rp_changed |= ctx->dynamic_fb.info.layerCount != layers;
ctx->dynamic_fb.info.layerCount = layers;
ctx->gfx_pipeline_state.rendering_info.colorAttachmentCount = ctx->fb_state.nr_cbufs;