mesa: Store the performance monitor object's name.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 31 Oct 2013 06:12:36 +0000 (23:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Nov 2013 02:51:06 +0000 (18:51 -0800)
Being able to print monitor->Name is really useful for debugging.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/mtypes.h
src/mesa/main/performance_monitor.c

index 67c4996e6736fe271a0106482401acc3169c159c..926d94860994c6c09e5da2e1f6b16ec4d44fb6d4 100644 (file)
@@ -1846,6 +1846,8 @@ struct gl_transform_feedback_state
  */
 struct gl_perf_monitor_object
 {
+   GLuint Name;
+
    GLboolean Active;
 
    /**
index 17cae5183627f32086c5c647ab8c4917e113c15f..06c5c2f133bf0de5448b7180ddcecead75d95244 100644 (file)
@@ -62,6 +62,8 @@ new_performance_monitor(struct gl_context *ctx, GLuint index)
    if (m == NULL)
       return NULL;
 
+   m->Name = index;
+
    m->ActiveGroups =
       rzalloc_array(NULL, unsigned, ctx->PerfMonitor.NumGroups);