From e30367a27361bc561c2d1ab513f7d522ce9ada33 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 14 Jun 2020 00:32:25 -0400 Subject: [PATCH] zink: use correct number of samples on framebuffer in set_framebuffer_state state->samples doesn't necessarily reflect the correct value here, so we need to use the util function Reviewed-by: Erik Faye-Lund 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 3f7d4abc87e..3bc79eea73f 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -611,7 +611,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx, zink_framebuffer_reference(screen, &ctx->framebuffer, fb); zink_render_pass_reference(screen, &ctx->gfx_pipeline_state.render_pass, fb->rp); - ctx->gfx_pipeline_state.rast_samples = MAX2(state->samples, 1); + ctx->gfx_pipeline_state.rast_samples = util_framebuffer_get_num_samples(state); ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs; ctx->gfx_pipeline_state.hash = 0;