[Mesa-dev] [PATCH v3 15/19] st/nine: return S_FALSE instead of INVALIDCALL when in building query state

David Heidelberg david at ixit.cz
Mon Nov 24 15:38:15 PST 2014


From: Axel Davy <axel.davy at ens.fr>

It is the same behaviour as wine has.

Cc: "10.4" <mesa-stable at lists.freedesktop.org>
Reviewed-by: David Heidelberg <david at ixit.cz>
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/query9.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
index 8a2957a..38841e6 100644
--- a/src/gallium/state_trackers/nine/query9.c
+++ b/src/gallium/state_trackers/nine/query9.c
@@ -203,7 +203,10 @@ NineQuery9_GetData( struct NineQuery9 *This,
     DBG("This=%p pData=%p dwSize=%d dwGetDataFlags=%d\n",
         This, pData, dwSize, dwGetDataFlags);
 
-    user_assert(This->state != NINE_QUERY_STATE_RUNNING, D3DERR_INVALIDCALL);
+    /* according to spec we should return D3DERR_INVALIDCALL here, but
+     * wine returns S_FALSE because it is apparently the behaviour
+     * on windows */
+    user_assert(This->state != NINE_QUERY_STATE_RUNNING, S_FALSE);
     user_assert(dwSize == 0 || pData, D3DERR_INVALIDCALL);
     user_assert(dwGetDataFlags == 0 ||
                 dwGetDataFlags == D3DGETDATA_FLUSH, D3DERR_INVALIDCALL);
-- 
2.1.3



More information about the mesa-dev mailing list