From: Patrick Rudolph Date: Fri, 30 Sep 2016 14:15:38 +0000 (+0200) Subject: st/nine: Add additional error handling in CheckDeviceMultiSampleType X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5603056872708fdd82f1224854097805a01d4c0;p=mesa.git 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 Reviewed-by: Axel Davy --- 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;