From 6b35662e30ed873673e539f109a83117176b8bfd Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Mon, 24 Nov 2014 23:14:54 +0100 Subject: [PATCH] st/nine: Queries: Remove flush logic get_query_result flushes automatically, we don't need to flush. Reviewed-by: Ilia Mirkin Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/query9.c | 13 +++++-------- src/gallium/state_trackers/nine/query9.h | 1 - 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 -- 2.30.2