diff options
author | Patrick Rudolph <[email protected]> | 2016-09-30 16:15:38 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-10-10 23:43:51 +0200 |
commit | b5603056872708fdd82f1224854097805a01d4c0 (patch) | |
tree | 17344d3ebf2afcf1bd25bc4e1defcc608480f22b /src/gallium/state_trackers/nine/adapter9.c | |
parent | 7afab4ad39b5c479d5c986483511c68b92c31219 (diff) |
st/nine: Add additional error handling in CheckDeviceMultiSampleType
Return one supported quality level in error cases.
Return error on invalid multisample count.
Fixes failing wine tests.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/adapter9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/adapter9.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c index dad5fcbad32..fbbc586204a 100644 --- a/src/gallium/state_trackers/nine/adapter9.c +++ b/src/gallium/state_trackers/nine/adapter9.c @@ -385,6 +385,12 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This, d3dformat_to_string(SurfaceFormat), Windowed, MultiSampleType, pQualityLevels); + if (pQualityLevels) { + /* In error cases return only 1 quality level supported */ + *pQualityLevels = 1; + } + user_assert(MultiSampleType < D3DMULTISAMPLE_16_SAMPLES, D3DERR_INVALIDCALL); + hr = NineAdapter9_GetScreen(This, DeviceType, &screen); if (FAILED(hr)) return hr; |