X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=metrics.h;h=accafe5f8e91f2660e46687dfc39cbf959b107cc;hb=2926b5a9207c28986f449a322761e4103f4c28e7;hp=b5f985977a5a6ecbeec45024a1a45864a5b196c0;hpb=61b4545d541527ca2bd76811195b964595db7ed1;p=fips diff --git a/metrics.h b/metrics.h index b5f9859..accafe5 100644 --- a/metrics.h +++ b/metrics.h @@ -50,6 +50,15 @@ typedef enum METRICS_OP_SHADER } metrics_op_t; +/* Initialize metrics info + * + * This queries the names and ranges for all available performance counters. + * + * This should be called once before any other metrics functions. + */ +void +metrics_info_init (void); + /* Start accumulating GPU time. * * The time accumulated will be accounted against the @@ -77,6 +86,12 @@ metrics_counter_stop (void); void metrics_set_current_op (metrics_op_t op); +/* Return the current metrics_op_t value, (the value most-recently-set + * with a call to metrics_set_current_op). + */ +metrics_op_t +metrics_get_current_op (void); + /* Should be called at the end of every function wrapper for a * function that ends a frame, (glXSwapBuffers and similar). *