Mesa (master): zink: use max_rt to determine number of blend state attachments

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 1 20:04:12 UTC 2021


Module: Mesa
Branch: master
Commit: ccbaf31f3cec9c567bd997d890446b71b28b32b6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ccbaf31f3cec9c567bd997d890446b71b28b32b6

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Mar  9 09:33:54 2021 -0500

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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9988>

---

 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;



More information about the mesa-commit mailing list