summaryrefslogtreecommitdiff
path: root/prologue.c
blob: 4ce20fc0a8888eef4de0ae7ce062b5ca60243328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Auto-generated, do not edit */

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/time.h>

#include <GL/gl.h>
#include <GL/glx.h>

#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))

static PFNGLXGETPROCADDRESSPROC lib_glXGetProcAddressARB;

// dump time for each function call
static const int trace_perfunc = 0;
// dump the total time per function
static const int trace_summary = 1;
// dump the shader programs
static const int trace_shaders = 0;
// trace vertex array performance
static const int trace_arrays = 0;

static uint64_t gettime64()
{
	struct timeval tv;
	gettimeofday(&tv, NULL);
	return ((uint64_t)tv.tv_sec * 1000000ULL + (uint64_t)tv.tv_usec);
}

static void vertex_array_add(int num_elements, uint64_t time);