st/mesa: handle lowered IO in st_nir_assign_vs_in_locations
[mesa.git] / src / mesa / state_tracker / st_cb_perfmon.h
index 13d3627de5dcce203d02bc5309679372c8eef98c..98202f23c83b78c4b0ba14e6a20e22e32a4ed0e4 100644 (file)
 
 #include "util/list.h"
 
+struct st_perf_counter_object
+{
+   struct pipe_query *query;
+   int id;
+   int group_id;
+   unsigned batch_index;
+};
+
 /**
  * Subclass of gl_perf_monitor_object
  */
 struct st_perf_monitor_object
 {
    struct gl_perf_monitor_object base;
-   struct list_head active_counters;
+   unsigned num_active_counters;
+   struct st_perf_counter_object *active_counters;
+
+   struct pipe_query *batch_query;
+   union pipe_query_result *batch_result;
 };
 
-struct st_perf_counter_object
+/**
+ * Extra data per counter, supplementing gl_perf_monitor_counter with
+ * driver-specific information.
+ */
+struct st_perf_monitor_counter
 {
-   struct list_head list;
-   struct pipe_query *query;
-   int id;
-   int group_id;
+   unsigned query_type;
+   unsigned flags;
+};
+
+struct st_perf_monitor_group
+{
+   struct st_perf_monitor_counter *counters;
+   bool has_batch;
 };
 
 /**
  * Cast wrapper
  */
-static INLINE struct st_perf_monitor_object *
+static inline struct st_perf_monitor_object *
 st_perf_monitor_object(struct gl_perf_monitor_object *q)
 {
    return (struct st_perf_monitor_object *)q;
 }
 
 bool
-st_init_perfmon(struct st_context *st);
+st_have_perfmon(struct st_context *st);
 
 void
 st_destroy_perfmon(struct st_context *st);