diff options
author | Axel Davy <[email protected]> | 2016-11-20 10:55:54 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:21 +0100 |
commit | 85811d0e87b4e460a1cf4cc6654482c05628c383 (patch) | |
tree | 1340089ba9f8d95dec4da7fd9c75395469ac8920 /src/gallium | |
parent | bce9fe8db25d767d51ed995e2dcb56a89b40d21a (diff) |
st/nine: Ignore MULTISAMPLEMASK when RT is not multisampled
We were ignoring MULTISAMPLEMASK for non-maskable multisample
modes, but we were missing the non-multisampled case.
Fixes a crash in Halo.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 62f2e8e52d4..3523748448e 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -1842,8 +1842,8 @@ NineDevice9_SetRenderTarget( struct NineDevice9 *This, This->state.changed.group |= NINE_STATE_VIEWPORT | NINE_STATE_SCISSOR | NINE_STATE_MULTISAMPLE; if (This->state.rt[0] && - (This->state.rt[0]->desc.MultiSampleType == D3DMULTISAMPLE_NONMASKABLE) != - (rt->desc.MultiSampleType == D3DMULTISAMPLE_NONMASKABLE)) + (This->state.rt[0]->desc.MultiSampleType <= D3DMULTISAMPLE_NONMASKABLE) != + (rt->desc.MultiSampleType <= D3DMULTISAMPLE_NONMASKABLE)) This->state.changed.group |= NINE_STATE_SAMPLE_MASK; } diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 503ff5c659d..9e2dfc666d3 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -1100,7 +1100,7 @@ nine_update_state(struct NineDevice9 *device) pipe->set_blend_color(pipe, &color); } if (group & NINE_STATE_SAMPLE_MASK) { - if (state->rt[0]->desc.MultiSampleType == D3DMULTISAMPLE_NONMASKABLE) { + if (state->rt[0]->desc.MultiSampleType <= D3DMULTISAMPLE_NONMASKABLE) { pipe->set_sample_mask(pipe, ~0); } else { pipe->set_sample_mask(pipe, state->rs[D3DRS_MULTISAMPLEMASK]); |