st/nine: Queries: Remove flush logic

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>
This commit is contained in:
Axel Davy 2014-11-24 23:14:54 +01:00
parent 3e48791aea
commit 6b35662e30
2 changed files with 5 additions and 9 deletions

View 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;

View 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