gallium: new shader cap bit for the amount of sampler views
[mesa.git] / src / gallium / drivers / ilo / ilo_query.h
index e30f7e1f28369cf374b0dd1e8808072714007ff9..7fedb2fbe03c796a97d654ff32a4918144910414 100644 (file)
 
 #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 */