X-Git-Url: https://git.cworth.org/git?p=fips;a=blobdiff_plain;f=glwrap.c;h=ebe7e54ca67386d1e51d648dde3ba5fcc8b39f1d;hp=3c751cc4e19832aa49d55516b8b38b00aea9033b;hb=2ddfc599cf1f15f2eec12ddb24754fe768b38e03;hpb=a73706f5eae8f1be84a8cebd50f32b08cc66b16c diff --git a/glwrap.c b/glwrap.c index 3c751cc..ebe7e54 100644 --- a/glwrap.c +++ b/glwrap.c @@ -111,9 +111,7 @@ glwrap_lookup (char *name) /* Execute an OpenGL call and time it with a GPU metrics counter. */ #define TIMED_DEFER(function,...) do { \ if (! inside_new_list) { \ - unsigned counter; \ - counter = metrics_counter_new (); \ - metrics_counter_start (counter); \ + metrics_counter_start (); \ } \ GLWRAP_DEFER(function, __VA_ARGS__); \ if (! inside_new_list) { \ @@ -386,11 +384,7 @@ void glBegin (GLenum mode) { if (! inside_new_list) - { - unsigned counter; - counter = metrics_counter_new (); - metrics_counter_start (counter); - } + metrics_counter_start (); GLWRAP_DEFER (glBegin, mode); } @@ -400,9 +394,8 @@ glEnd (void) { GLWRAP_DEFER (glEnd); - if (! inside_new_list) { + if (! inside_new_list) metrics_counter_stop (); - } } /* And we need to track display lists to avoid inserting queries