summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/query9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-11-13 16:28:33 +0100
committerAxel Davy <[email protected]>2016-12-20 23:47:08 +0100
commit9c4b4e8809f1e6e076c01ba7b11dc1636c2a26b4 (patch)
tree7a7bff1ff1f6b618139550051039776f59b6e511 /src/gallium/state_trackers/nine/query9.c
parent8a69343f1e8c59137d7b746e5ca8ef1e7944c7d6 (diff)
st/nine: Avoid flushing the queue for queries GetData
Use the newly introduced counter to know when we don't need synchronization. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/query9.c')
-rw-r--r--src/gallium/state_trackers/nine/query9.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
index 6bba4a78524..d98db9eba7e 100644
--- a/src/gallium/state_trackers/nine/query9.c
+++ b/src/gallium/state_trackers/nine/query9.c
@@ -139,7 +139,7 @@ NineQuery9_dtor( struct NineQuery9 *This )
if (This->pq) {
if (This->state == NINE_QUERY_STATE_RUNNING)
- nine_context_end_query(device, This->pq);
+ nine_context_end_query(device, &This->counter, This->pq);
nine_context_destroy_query(device, This->pq);
}
@@ -177,15 +177,15 @@ NineQuery9_Issue( struct NineQuery9 *This,
if (dwIssueFlags == D3DISSUE_BEGIN) {
if (This->state == NINE_QUERY_STATE_RUNNING)
- nine_context_end_query(device, This->pq);
- nine_context_begin_query(device, This->pq);
+ nine_context_end_query(device, &This->counter, This->pq);
+ nine_context_begin_query(device, &This->counter, This->pq);
This->state = NINE_QUERY_STATE_RUNNING;
} else {
if (This->state != NINE_QUERY_STATE_RUNNING &&
This->type != D3DQUERYTYPE_EVENT &&
This->type != D3DQUERYTYPE_TIMESTAMP)
- nine_context_begin_query(device, This->pq);
- nine_context_end_query(device, This->pq);
+ nine_context_begin_query(device, &This->counter, This->pq);
+ nine_context_end_query(device, &This->counter, This->pq);
This->state = NINE_QUERY_STATE_ENDED;
}
return D3D_OK;
@@ -240,7 +240,7 @@ NineQuery9_GetData( struct NineQuery9 *This,
/* Note: We ignore dwGetDataFlags, because get_query_result will
* flush automatically if needed */
- ok = nine_context_get_query_result(device, This->pq,
+ ok = nine_context_get_query_result(device, This->pq, &This->counter,
!!(dwGetDataFlags & D3DGETDATA_FLUSH),
wait_query_result, &presult);