st/nine: Queries: Remove flush logic
authorAxel Davy <axel.davy@ens.fr>
Mon, 24 Nov 2014 22:14:54 +0000 (23:14 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 3 Dec 2014 15:39:24 +0000 (16:39 +0100)
get_query_result flushes automatically, we don't need to flush.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/query9.c
src/gallium/state_trackers/nine/query9.h

index 0cb3d2eac8271266e6604b9c0ebc828f6556a149..5e301442dead3aa9d3364acbd03ccecaf65e2d7a 100644 (file)
@@ -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;
index f08393fcf3481b43b0e2bfcce02233362cda58cc..abd43521862a21e1e5419a628a4976912621505c 100644 (file)
@@ -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