summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/nine_state.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2016-09-22 17:03:17 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:51 +0200
commit60624be2033f06b414cf76794c2f3b061dc28332 (patch)
treea85df52e8af5b9299206723db714da8f8d0851c1 /src/gallium/state_trackers/nine/nine_state.c
parent8a50b1244fcb77334dc9d8e470061cd5f9537375 (diff)
st/nine: Implement MSAA quality levels
Advertise quality levels: Each supported multisample count matches to one quality level. The application doesn't know how much samples each quality level has. For that reason it's not possible to set the multisample mask. Return errors on quality level missmatch. Fixes several old games not having multisample support until now. Fix for issue #73. Signed-off-by: Patrick Rudolph <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/nine_state.c')
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 66c75812c15..ed3c821f337 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -1088,7 +1088,11 @@ nine_update_state(struct NineDevice9 *device)
pipe->set_blend_color(pipe, &color);
}
if (group & NINE_STATE_SAMPLE_MASK) {
- pipe->set_sample_mask(pipe, state->rs[D3DRS_MULTISAMPLEMASK]);
+ if (state->rt[0]->desc.MultiSampleType == D3DMULTISAMPLE_NONMASKABLE) {
+ pipe->set_sample_mask(pipe, ~0);
+ } else {
+ pipe->set_sample_mask(pipe, state->rs[D3DRS_MULTISAMPLEMASK]);
+ }
}
if (group & NINE_STATE_STENCIL_REF) {
struct pipe_stencil_ref ref;