summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-11-24 23:26:46 +0100
committerEmil Velikov <[email protected]>2014-12-03 23:18:48 +0000
commitfd2852fe5b504c91ff0d42fef1dc90715e798114 (patch)
tree294ace58a15618b4c06fb4f221a7024b38106402 /src
parent57057c439e03e7b7d7bdc130d35523d4143b62ac (diff)
st/nine: Queries: Fix D3DISSUE_END behaviour.
Issuing D3DISSUE_END should: . reset previous queries if possible . end the query Previous behaviour wasn't calling end_query for queries not needing D3DISSUE_BEGIN, nor resetting previous queries. This fixes several applications not launching properly. Cc: "10.4" <[email protected]> Tested-by: David Heidelberg <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]> (cherry picked from commit eac0b9b68a14719be01bbabd8d3807d81694685b) Conflicts: src/gallium/state_trackers/nine/query9.c
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/query9.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
index 908420c30dd..e7b67c88c74 100644
--- a/src/gallium/state_trackers/nine/query9.c
+++ b/src/gallium/state_trackers/nine/query9.c
@@ -190,10 +190,12 @@ NineQuery9_Issue( struct NineQuery9 *This,
pipe->begin_query(pipe, This->pq);
This->state = NINE_QUERY_STATE_RUNNING;
} else {
- if (This->state == NINE_QUERY_STATE_RUNNING) {
- pipe->end_query(pipe, This->pq);
- This->state = NINE_QUERY_STATE_ENDED;
- }
+ if (This->state != NINE_QUERY_STATE_RUNNING &&
+ This->type != D3DQUERYTYPE_EVENT &&
+ This->type != D3DQUERYTYPE_TIMESTAMP)
+ pipe->begin_query(pipe, This->pq);
+ pipe->end_query(pipe, This->pq);
+ This->state = NINE_QUERY_STATE_ENDED;
}
return D3D_OK;
}