diff options
author | Rob Clark <[email protected]> | 2020-04-16 10:53:03 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-23 04:49:52 +0000 |
commit | 85f84ea148474554af42ca513b9cb7c43a78a738 (patch) | |
tree | a5143126169723b0eb5a3ec90a08e4bca240e21b /src/gallium/state_trackers/nine | |
parent | b88778e2de3a593587e20a8d4f0363a499f91455 (diff) |
gallium: add # of MRT to blend state
To make it possible for drivers to avoid unnecessary blend state change
for unused MRTs. Otherwise the driver would have to manage different
blend CSOs for different potential #s of render targets.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4619>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_pipe.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_pipe.c b/src/gallium/state_trackers/nine/nine_pipe.c index dd858aef743..7531845efd6 100644 --- a/src/gallium/state_trackers/nine/nine_pipe.c +++ b/src/gallium/state_trackers/nine/nine_pipe.c @@ -186,6 +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.rt[0].colormask = rs[D3DRS_COLORWRITEENABLE]; if (rs[D3DRS_COLORWRITEENABLE1] != rs[D3DRS_COLORWRITEENABLE] || @@ -198,6 +199,7 @@ 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]; */ |