summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-11-24 22:40:04 +0100
committerAxel Davy <[email protected]>2014-12-03 16:39:23 +0100
commit3e48791aea6cb1e21c951360e8d2cbbb27add251 (patch)
tree0ad4213811131e1e7bbd3cd4f137bd54ab5a03c4 /src/gallium/state_trackers/nine/device9.c
parent79f9a106b90bab7ff305b5f92cb8501d66c497ea (diff)
st/nine: Queries: remove dummy queries
Applications are supposed to call CreateQuery with a NULL ppQuery to know if the query is supported. We supported that. However when ppQuery was not NULL, we were accepting to create the query and were creating a dummy query even when the query is not supported. Wine has different behaviour. This patch drops the dummy queries support and matches wine behaviour. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index d48f47d5bd4..c16f7284799 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -3359,8 +3359,9 @@ NineDevice9_CreateQuery( struct NineDevice9 *This,
DBG("This=%p Type=%d ppQuery=%p\n", This, Type, ppQuery);
- if (!ppQuery)
- return nine_is_query_supported(Type);
+ hr = nine_is_query_supported(Type);
+ if (!ppQuery || hr != D3D_OK)
+ return hr;
hr = NineQuery9_new(This, &query, Type);
if (FAILED(hr))