nvc0: move HW queries to nvc0_query_hw.c/h files
[mesa.git] / src / gallium / drivers / nouveau / nvc0 / nvc0_query.h
1 #ifndef __NVC0_QUERY_H__
2 #define __NVC0_QUERY_H__
3
4 #include "pipe/p_context.h"
5
6 #include "nouveau_context.h"
7
8 struct nvc0_context;
9 struct nvc0_query;
10
11 struct nvc0_query_funcs {
12 void (*destroy_query)(struct nvc0_context *, struct nvc0_query *);
13 boolean (*begin_query)(struct nvc0_context *, struct nvc0_query *);
14 void (*end_query)(struct nvc0_context *, struct nvc0_query *);
15 boolean (*get_query_result)(struct nvc0_context *, struct nvc0_query *,
16 boolean, union pipe_query_result *);
17 };
18
19 struct nvc0_query {
20 const struct nvc0_query_funcs *funcs;
21 uint16_t type;
22 uint16_t index;
23 };
24
25 static inline struct nvc0_query *
26 nvc0_query(struct pipe_query *pipe)
27 {
28 return (struct nvc0_query *)pipe;
29 }
30
31 /*
32 * Driver queries groups:
33 */
34 #define NVC0_QUERY_MP_COUNTER_GROUP 0
35 #define NVC0_SW_QUERY_DRV_STAT_GROUP 1
36
37 void nvc0_init_query_functions(struct nvc0_context *);
38
39 #endif