diff options
author | Marek Olšák <[email protected]> | 2011-10-28 18:27:00 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-10-28 19:29:05 +0200 |
commit | e9b6f21a5054b2639a1dfc6401e4e9053dce5394 (patch) | |
tree | cff3171b99578309123c17fc0bdd40eac39931cc /src/gallium/drivers/r600/r600.h | |
parent | b70a51318a43f489611f4fc2f93887a362f5c99f (diff) |
r600g: only maintain the list of active queries
And not all existing queries. The only reason we have that list is to be able
to suspend and resume the active ones.
This reduces looping over queries when suspending and resuming.
The queries no longer have to track some of their states.
Diffstat (limited to 'src/gallium/drivers/r600/r600.h')
-rw-r--r-- | src/gallium/drivers/r600/r600.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index ea9a2d658c2..f58549afb4d 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -179,7 +179,7 @@ struct r600_query { /* Count of new queries started in one stream without flushing */ unsigned queries_emitted; /* State flags */ - unsigned state; + boolean flushed; /* The buffer where query results are stored. It's used as a ring, * data blocks for current query are stored sequentially from * results_start to results_end, with wrapping on the buffer end */ @@ -188,11 +188,6 @@ struct r600_query { struct list_head list; }; -#define R600_QUERY_STATE_STARTED (1 << 0) -#define R600_QUERY_STATE_ENDED (1 << 1) -#define R600_QUERY_STATE_SUSPENDED (1 << 2) -#define R600_QUERY_STATE_FLUSHED (1 << 3) - #define R600_CONTEXT_DRAW_PENDING (1 << 0) #define R600_CONTEXT_DST_CACHES_DIRTY (1 << 1) #define R600_CONTEXT_CHECK_EVENT_FLUSH (1 << 2) @@ -218,7 +213,9 @@ struct r600_context { u32 *pm4; unsigned pm4_cdwords; - struct list_head query_list; + /* The list of active queries. Only one query of each type can be active. */ + struct list_head active_query_list; + unsigned num_query_running; unsigned backend_mask; unsigned max_db; /* for OQ */ |