From: Axel Davy Date: Mon, 4 May 2020 20:40:08 +0000 (+0200) Subject: st/nine: Set correctly blend max_rt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aac964af4aa1a215196d6ae351a11c9b6b937a22;p=mesa.git st/nine: Set correctly blend max_rt 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: --- 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]; */