diff options
author | Eric Anholt <[email protected]> | 2012-08-07 10:05:38 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-12 19:08:25 -0700 |
commit | 006c1a3c652803e2ff8d5f7ea55c9cb5d8353279 (patch) | |
tree | 5e9cca2fc9d3f45780fb65d65faf76c5fee9e0aa /src/mesa/drivers/dri/intel/intel_screen.c | |
parent | 97a5f0ff2eb3a6e8b303ce402a4e1d9be7e7b323 (diff) |
i965: Add perf debug for stalls during shader compiles.
v2: fix bad comment from before I gave up and decided to just use doubles.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 3c595bc6e75..e1ec2eb0130 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -109,6 +109,19 @@ const GLuint __driNConfigOptions = 15; static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; #endif /*USE_NEW_INTERFACE */ +/** + * For debugging purposes, this returns a time in seconds. + */ +double +get_time(void) +{ + struct timespec tp; + + clock_gettime(CLOCK_MONOTONIC, &tp); + + return tp.tv_sec + tp.tv_nsec / 1000000000.0; +} + void aub_dump_bmp(struct gl_context *ctx) { |