From ccbaf31f3cec9c567bd997d890446b71b28b32b6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 9 Mar 2021 09:33:54 -0500 Subject: [PATCH] zink: use max_rt to determine number of blend state attachments this is more consistent with how gallium applies the states Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c index a93c822f269..a5a6e151c67 100644 --- a/src/gallium/drivers/zink/zink_state.c +++ b/src/gallium/drivers/zink/zink_state.c @@ -243,7 +243,7 @@ zink_create_blend_state(struct pipe_context *pctx, cso->need_blend_constants = false; - for (int i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) { + for (int i = 0; i < blend_state->max_rt + 1; ++i) { const struct pipe_rt_blend_state *rt = blend_state->rt; if (blend_state->independent_blend_enable) rt = blend_state->rt + i;