1 #ifndef __NVC0_QUERY_H__
2 #define __NVC0_QUERY_H__
4 #include "pipe/p_context.h"
6 #include "nouveau_context.h"
11 struct nvc0_query_funcs
{
12 void (*destroy_query
)(struct nvc0_context
*, struct nvc0_query
*);
13 bool (*begin_query
)(struct nvc0_context
*, struct nvc0_query
*);
14 void (*end_query
)(struct nvc0_context
*, struct nvc0_query
*);
15 bool (*get_query_result
)(struct nvc0_context
*, struct nvc0_query
*,
16 bool, union pipe_query_result
*);
17 void (*get_query_result_resource
)(struct nvc0_context
*nvc0
,
20 enum pipe_query_value_type result_type
,
22 struct pipe_resource
*resource
,
27 const struct nvc0_query_funcs
*funcs
;
32 static inline struct nvc0_query
*
33 nvc0_query(struct pipe_query
*pipe
)
35 return (struct nvc0_query
*)pipe
;
39 * Driver queries groups:
41 #define NVC0_HW_SM_QUERY_GROUP 0
42 #define NVC0_HW_METRIC_QUERY_GROUP 1
43 #define NVC0_SW_QUERY_DRV_STAT_GROUP 2
45 void nvc0_init_query_functions(struct nvc0_context
*);