summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorAxel Davy <davyaxel0@gmail.com>2020-05-04 22:40:08 +0200
committerMarge Bot <eric+marge@anholt.net>2020-05-05 16:45:06 +0000
commitaac964af4aa1a215196d6ae351a11c9b6b937a22 (patch)
tree49cc6ba9e6d921e2bbbdaf10e09d9530a3f37e49 /src/gallium/state_trackers
parent0d83e7f4b9887346e9b7b4d44c068d340aa04f28 (diff)
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 <davyaxel0@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4891>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/nine/nine_pipe.c3
1 files changed, 1 insertions, 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]; */