From aac964af4aa1a215196d6ae351a11c9b6b937a22 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Mon, 4 May 2020 22:40:08 +0200 Subject: [PATCH 1/1] st/nine: Set correctly blend max_rt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Currently nine_convert_blend_state has no way of knowing the number of rts. For now set to an upper bound. Signed-off-by: Axel Davy Reviewed-by: Marek Olšák Reviewed-by: Rob Clark Part-of: --- src/gallium/state_trackers/nine/nine_pipe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_pipe.c b/src/gallium/state_trackers/nine/nine_pipe.c index 7531845efd6..cc63a9fce8f 100644 --- a/src/gallium/state_trackers/nine/nine_pipe.c +++ b/src/gallium/state_trackers/nine/nine_pipe.c @@ -186,7 +186,7 @@ nine_convert_blend_state(struct pipe_blend_state *blend_state, const DWORD *rs) nine_convert_blend_state_fixup(&blend, rs); /* for BOTH[INV]SRCALPHA */ } - blend.max_rt = 0; + blend.max_rt = 3; /* Upper bound. Could be optimized to fb->nr_cbufs for example */ blend.rt[0].colormask = rs[D3DRS_COLORWRITEENABLE]; if (rs[D3DRS_COLORWRITEENABLE1] != rs[D3DRS_COLORWRITEENABLE] || @@ -199,7 +199,6 @@ nine_convert_blend_state(struct pipe_blend_state *blend_state, const DWORD *rs) blend.rt[1].colormask = rs[D3DRS_COLORWRITEENABLE1]; blend.rt[2].colormask = rs[D3DRS_COLORWRITEENABLE2]; blend.rt[3].colormask = rs[D3DRS_COLORWRITEENABLE3]; - blend.max_rt = 3; } /* blend.force_srgb = !!rs[D3DRS_SRGBWRITEENABLE]; */ -- 2.30.2