summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2016-09-30 16:15:38 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:51 +0200
commitb5603056872708fdd82f1224854097805a01d4c0 (patch)
tree17344d3ebf2afcf1bd25bc4e1defcc608480f22b
parent7afab4ad39b5c479d5c986483511c68b92c31219 (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]>
-rw-r--r--src/gallium/state_trackers/nine/adapter9.c6
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;