X-Git-Url: https://git.cworth.org/git?p=fips;a=blobdiff_plain;f=metrics.h;h=2d93d908d39026cf1fd4b0b8fda9bd199d24f0ef;hp=261a5a5c13fe3a5771544479d3a02b3ed58f04e2;hb=fac9c8c2d3bfc5e97f2fdcf90f8cbe3ac9b2c49e;hpb=6475596e655063624dbf54359bd2a45de6a17dd1 diff --git a/metrics.h b/metrics.h index 261a5a5..2d93d90 100644 --- a/metrics.h +++ b/metrics.h @@ -27,10 +27,19 @@ * The value accumulated in this counter be accounted against the * current program (as set with metrics_set_current_program). * - * Returns: A counter ID suitable for use with glBeginQuery/glEndQuery + * Returns: A counter ID suitable for use with metrics_counter_start + * and metrics_counter_stop. */ unsigned -metrics_add_counter (void); +metrics_counter_new (void); + +/* Start accumulating GPU time spent into the given counter. */ +void +metrics_counter_start (unsigned counter); + +/* Stop accumulating GPU time (stops the most-recently started counter) */ +void +metrics_counter_stop (void); /* Set the ID of the currently executing shader program. *