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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9988>
This commit is contained in:
Mike Blumenkrantz 2021-03-09 09:33:54 -05:00 committed by Marge Bot
parent 7dc1b57abb
commit ccbaf31f3c

View file

@ -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;