From 7edecbf4c2728d1f8e82da63cb2027933020b821 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 15 Jun 2022 13:00:16 -0400 Subject: [PATCH] zink: clamp dynamic fb layers better this needs to be the minimum layer, not the maximum Fixes: c81cd989c85 ("zink: use dynamic rendering (most of the time)") Reviewed-by: Adam Jackson Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 82903ed77f0..be5c81ddc11 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2617,7 +2617,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 = MAX2(util_framebuffer_get_num_layers(state), 1); + unsigned layers = MAX2(zink_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;