summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_context.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2015-11-10 14:06:59 +0100
committerNicolai Hähnle <[email protected]>2015-11-20 17:27:28 +0100
commitd61d4df02e568d314c4e763ba9b5bdd57aef98c5 (patch)
treed6003262842a8b974ec8051ca23edf838f484190 /src/gallium/include/pipe/p_context.h
parentc235300bfc3547d418f9a66555a5ee93a15666f9 (diff)
gallium: add the concept of batch queries
Some drivers (in particular radeon[si], but also freedreno judging from a quick grep) may want to expose performance counters that cannot be individually enabled or disabled. Allow such drivers to mark driver-specific queries as requiring a new type of batch query object that is used to start and stop a list of queries simultaneously. v3: adjust recently added nv50 queries v2: documentation for create_batch_query Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_context.h')
-rw-r--r--src/gallium/include/pipe/p_context.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 27f358f8fb9..be7447de67d 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -116,6 +116,25 @@ struct pipe_context {
unsigned query_type,
unsigned index );
+ /**
+ * Create a query object that queries all given query types simultaneously.
+ *
+ * This can only be used for those query types for which
+ * get_driver_query_info indicates that it must be used. Only one batch
+ * query object may be active at a time.
+ *
+ * There may be additional constraints on which query types can be used
+ * together, in particular those that are implied by
+ * get_driver_query_group_info.
+ *
+ * \param num_queries the number of query types
+ * \param query_types array of \p num_queries query types
+ * \return a query object, or NULL on error.
+ */
+ struct pipe_query *(*create_batch_query)( struct pipe_context *pipe,
+ unsigned num_queries,
+ unsigned *query_types );
+
void (*destroy_query)(struct pipe_context *pipe,
struct pipe_query *q);