summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.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/device9.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/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 50565b876dd..47fd3a48b55 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1653,7 +1653,8 @@ NineDevice9_StretchRect( struct NineDevice9 *This,
clamped = !!xy;
}
- ms = (dst->desc.MultiSampleType | 1) != (src->desc.MultiSampleType | 1);
+ ms = (dst->desc.MultiSampleType != src->desc.MultiSampleType) ||
+ (dst->desc.MultiSampleQuality != src->desc.MultiSampleQuality);
if (clamped || scaled || (blit.dst.format != blit.src.format) || ms) {
DBG("using pipe->blit()\n");
@@ -1826,6 +1827,11 @@ NineDevice9_SetRenderTarget( struct NineDevice9 *This,
This->state.scissor.maxy = rt->desc.Height;
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.changed.group |= NINE_STATE_SAMPLE_MASK;
}
if (This->state.rt[i] != NineSurface9(pRenderTarget)) {