radeonsi: stop using TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
[mesa.git] / src / gallium / drivers / etnaviv / etnaviv_query_acc.h
index 3545c4810dccd0691420cc2961bcdfa4ff3923cf..9204befa03dd7fe645b031d9036092d0584e897f 100644 (file)
 struct etna_acc_query;
 
 struct etna_acc_sample_provider {
-   void (*start)(struct etna_acc_query *aq, struct etna_context *ctx);
-   void (*stop)(struct etna_acc_query *aq, struct etna_context *ctx);
-   void (*suspend)(struct etna_acc_query *aq, struct etna_context *ctx);
+   bool (*supports)(unsigned query_type);
+   struct etna_acc_query * (*allocate)(struct etna_context *ctx, unsigned query_type);
+
    void (*resume)(struct etna_acc_query *aq, struct etna_context *ctx);
+   void (*suspend)(struct etna_acc_query *aq, struct etna_context *ctx);
 
-   void (*result)(struct etna_acc_query *aq, void *buf,
-           union pipe_query_result *result);
+   bool (*result)(struct etna_acc_query *aq, void *buf,
+                  union pipe_query_result *result);
 };
 
 struct etna_acc_query {
@@ -68,10 +69,8 @@ etna_acc_query_suspend(struct etna_acc_query *aq, struct etna_context *ctx)
 {
    const struct etna_acc_sample_provider *p = aq->provider;
 
-   if (!aq->base.active)
-      return;
-
    p->suspend(aq, ctx);
+   aq->samples++;
 }
 
 static inline void
@@ -79,10 +78,8 @@ etna_acc_query_resume(struct etna_acc_query *aq, struct etna_context *ctx)
 {
    const struct etna_acc_sample_provider *p = aq->provider;
 
-   if (!aq->base.active)
-      return;
-
    p->resume(aq, ctx);
+   aq->samples++;
 }
 
 #endif