[Mesa-dev] [PATCH 65/75] st/nine: Add additional error handling in CheckDeviceMultiSampleType
Axel Davy
axel.davy at ens.fr
Wed Oct 5 20:09:38 UTC 2016
From: Patrick Rudolph <siro at das-labor.org>
Return one supported quality level in error cases.
Return error on invalid multisample count.
Fixes failing wine tests.
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
Reviewed-by: Axel Davy <axel.davy at ens.fr>
---
src/gallium/state_trackers/nine/adapter9.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c
index dad5fcb..fbbc586 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;
--
2.10.0
More information about the mesa-dev
mailing list