X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Filo%2Filo_query.h;h=7fedb2fbe03c796a97d654ff32a4918144910414;hb=2983c039df630bb9bcb70c52219c631e27b0eae6;hp=e30f7e1f28369cf374b0dd1e8808072714007ff9;hpb=63b572010554d62c3463c8db4e016ecbed117178;p=mesa.git diff --git a/src/gallium/drivers/ilo/ilo_query.h b/src/gallium/drivers/ilo/ilo_query.h index e30f7e1f283..7fedb2fbe03 100644 --- a/src/gallium/drivers/ilo/ilo_query.h +++ b/src/gallium/drivers/ilo/ilo_query.h @@ -30,9 +30,33 @@ #include "ilo_common.h" +struct intel_bo; struct ilo_context; +/** + * Queries can be bound to various places in the driver. While bound, it tells + * the driver to collect the data indicated by the type of the query. + */ +struct ilo_query { + unsigned type; + bool active; + + struct list_head list; + + /* storage for the collected data */ + union pipe_query_result data; + + /* for queries that need to read hardware statistics */ + struct intel_bo *bo; + int reg_read, reg_total; + int reg_cmd_size; /* in dwords, as expected by ilo_cp */ +}; + void ilo_init_query_functions(struct ilo_context *ilo); +bool +ilo_query_alloc_bo(struct ilo_query *q, int reg_count, int repeat_count, + struct intel_winsys *winsys); + #endif /* ILO_QUERY_H */