diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-05-29 10:22:51 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-05-29 10:22:51 +0000 |
commit | c9223eed3c16cd3e98a8f56dda953d8f299de0e3 (patch) | |
tree | 53e2a1c3f13bcf6b4ed201d7bc135e7213c94ebe /lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query.h | |
parent | 6e8f2d062ab9c198239b9283b2b7ed12f4ea17d8 (diff) |
Import Mesa 11.2.2
Diffstat (limited to 'lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query.h')
-rw-r--r-- | lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query.h b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query.h new file mode 100644 index 000000000..a887b2205 --- /dev/null +++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query.h @@ -0,0 +1,47 @@ +#ifndef __NVC0_QUERY_H__ +#define __NVC0_QUERY_H__ + +#include "pipe/p_context.h" + +#include "nouveau_context.h" + +struct nvc0_context; +struct nvc0_query; + +struct nvc0_query_funcs { + void (*destroy_query)(struct nvc0_context *, struct nvc0_query *); + boolean (*begin_query)(struct nvc0_context *, struct nvc0_query *); + void (*end_query)(struct nvc0_context *, struct nvc0_query *); + boolean (*get_query_result)(struct nvc0_context *, struct nvc0_query *, + boolean, union pipe_query_result *); + void (*get_query_result_resource)(struct nvc0_context *nvc0, + struct nvc0_query *q, + boolean wait, + enum pipe_query_value_type result_type, + int index, + struct pipe_resource *resource, + unsigned offset); +}; + +struct nvc0_query { + const struct nvc0_query_funcs *funcs; + uint16_t type; + uint16_t index; +}; + +static inline struct nvc0_query * +nvc0_query(struct pipe_query *pipe) +{ + return (struct nvc0_query *)pipe; +} + +/* + * Driver queries groups: + */ +#define NVC0_HW_SM_QUERY_GROUP 0 +#define NVC0_HW_METRIC_QUERY_GROUP 1 +#define NVC0_SW_QUERY_DRV_STAT_GROUP 2 + +void nvc0_init_query_functions(struct nvc0_context *); + +#endif |