Path: blob/21.2-virgl/src/gallium/drivers/nouveau/nvc0/nvc0_query.h
4574 views
#ifndef __NVC0_QUERY_H__1#define __NVC0_QUERY_H__23#include "pipe/p_context.h"45#include "nouveau_context.h"67struct nvc0_context;8struct nvc0_query;910struct nvc0_query_funcs {11void (*destroy_query)(struct nvc0_context *, struct nvc0_query *);12bool (*begin_query)(struct nvc0_context *, struct nvc0_query *);13void (*end_query)(struct nvc0_context *, struct nvc0_query *);14bool (*get_query_result)(struct nvc0_context *, struct nvc0_query *,15bool, union pipe_query_result *);16void (*get_query_result_resource)(struct nvc0_context *nvc0,17struct nvc0_query *q,18bool wait,19enum pipe_query_value_type result_type,20int index,21struct pipe_resource *resource,22unsigned offset);23};2425struct nvc0_query {26const struct nvc0_query_funcs *funcs;27uint16_t type;28uint16_t index;29};3031static inline struct nvc0_query *32nvc0_query(struct pipe_query *pipe)33{34return (struct nvc0_query *)pipe;35}3637/*38* Driver queries groups:39*/40#define NVC0_HW_SM_QUERY_GROUP 041#define NVC0_HW_METRIC_QUERY_GROUP 142#define NVC0_SW_QUERY_DRV_STAT_GROUP 24344void nvc0_init_query_functions(struct nvc0_context *);4546#endif474849