aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-11-24 23:14:54 +0100
committerAxel Davy <[email protected]>2014-12-03 16:39:24 +0100
commit6b35662e30ed873673e539f109a83117176b8bfd (patch)
tree2dd2c7a18be6cf4155144ffe426c1bd4eb7ee232
parent3e48791aea6cb1e21c951360e8d2cbbb27add251 (diff)
st/nine: Queries: Remove flush logic
get_query_result flushes automatically, we don't need to flush. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]>
-rw-r--r--src/gallium/state_trackers/nine/query9.c13
-rw-r--r--src/gallium/state_trackers/nine/query9.h1
2 files changed, 5 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
index 0cb3d2eac82..5e301442dea 100644
--- a/src/gallium/state_trackers/nine/query9.c
+++ b/src/gallium/state_trackers/nine/query9.c
@@ -212,15 +212,12 @@ NineQuery9_GetData( struct NineQuery9 *This,
if (This->state == NINE_QUERY_STATE_FRESH)
return S_OK;
+ /* Note: We ignore dwGetDataFlags, because get_query_result will
+ * flush automatically if needed */
+
ok = pipe->get_query_result(pipe, This->pq, FALSE, &presult);
- if (!ok) {
- if (dwGetDataFlags) {
- if (This->state != NINE_QUERY_STATE_FLUSHED)
- pipe->flush(pipe, NULL, 0);
- This->state = NINE_QUERY_STATE_FLUSHED;
- }
- return S_FALSE;
- }
+
+ if (!ok) return S_FALSE;
if (!dwSize)
return S_OK;
diff --git a/src/gallium/state_trackers/nine/query9.h b/src/gallium/state_trackers/nine/query9.h
index f08393fcf34..abd43521862 100644
--- a/src/gallium/state_trackers/nine/query9.h
+++ b/src/gallium/state_trackers/nine/query9.h
@@ -30,7 +30,6 @@ enum nine_query_state
NINE_QUERY_STATE_FRESH = 0,
NINE_QUERY_STATE_RUNNING,
NINE_QUERY_STATE_ENDED,
- NINE_QUERY_STATE_FLUSHED
};
struct NineQuery9