#include "fips-dispatch-gl.h"
#include "metrics.h"
+#include "xmalloc.h"
typedef struct counter
{
{
counter_t *counter;
- counter = malloc (sizeof(counter_t));
- if (counter == NULL) {
- fprintf (stderr, "Out of memory\n");
- exit (1);
- }
+ counter = xmalloc (sizeof(counter_t));
glGenQueries (1, &counter->id);
current_context.op = op;
}
+metrics_op_t
+metrics_get_current_op (void)
+{
+ return current_context.op;
+}
+
static void
accumulate_program_time (metrics_op_t op, unsigned time_ns)
{