aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/hud
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-26 15:01:24 +0200
committermarha <marha@users.sourceforge.net>2013-06-26 15:01:24 +0200
commit2fe2056807d1304de86deb2b59992d51d9252ad0 (patch)
tree665d730ee19df03e4dfca01371009ec778a343af /mesalib/src/gallium/auxiliary/hud
parentfa791414601df61d20d860299dba80fdb62565df (diff)
downloadvcxsrv-2fe2056807d1304de86deb2b59992d51d9252ad0.tar.gz
vcxsrv-2fe2056807d1304de86deb2b59992d51d9252ad0.tar.bz2
vcxsrv-2fe2056807d1304de86deb2b59992d51d9252ad0.zip
libXext mesa git update 29 June 20013
libXext commit 7378d4bdbd33ed49ed6cfa5c4f73d7527982aab4 mesa commit 9aebad618c0aab527a0b838ce0a79ffa6dd426bb
Diffstat (limited to 'mesalib/src/gallium/auxiliary/hud')
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_cpu.c12
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_fps.c12
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_private.h2
3 files changed, 23 insertions, 3 deletions
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_cpu.c b/mesalib/src/gallium/auxiliary/hud/hud_cpu.c
index ce98115d5..cd20deec9 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_cpu.c
+++ b/mesalib/src/gallium/auxiliary/hud/hud_cpu.c
@@ -116,6 +116,12 @@ query_cpu_load(struct hud_graph *gr)
}
}
+static void
+free_query_data(void *p)
+{
+ FREE(p);
+}
+
void
hud_cpu_graph_install(struct hud_pane *pane, unsigned cpu_index)
{
@@ -144,7 +150,11 @@ hud_cpu_graph_install(struct hud_pane *pane, unsigned cpu_index)
}
gr->query_new_value = query_cpu_load;
- gr->free_query_data = free;
+
+ /* Don't use free() as our callback as that messes up Gallium's
+ * memory debugger. Use simple free_query_data() wrapper.
+ */
+ gr->free_query_data = free_query_data;
info = gr->query_data;
info->cpu_index = cpu_index;
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_fps.c b/mesalib/src/gallium/auxiliary/hud/hud_fps.c
index 80381f547..6e9be712b 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_fps.c
+++ b/mesalib/src/gallium/auxiliary/hud/hud_fps.c
@@ -60,6 +60,12 @@ query_fps(struct hud_graph *gr)
}
}
+static void
+free_query_data(void *p)
+{
+ FREE(p);
+}
+
void
hud_fps_graph_install(struct hud_pane *pane)
{
@@ -76,7 +82,11 @@ hud_fps_graph_install(struct hud_pane *pane)
}
gr->query_new_value = query_fps;
- gr->free_query_data = free;
+
+ /* Don't use free() as our callback as that messes up Gallium's
+ * memory debugger. Use simple free_query_data() wrapper.
+ */
+ gr->free_query_data = free_query_data;
hud_pane_add_graph(pane, gr);
}
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_private.h b/mesalib/src/gallium/auxiliary/hud/hud_private.h
index 2b7d56bb1..1606ada4a 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_private.h
+++ b/mesalib/src/gallium/auxiliary/hud/hud_private.h
@@ -42,7 +42,7 @@ struct hud_graph {
char name[128];
void *query_data;
void (*query_new_value)(struct hud_graph *gr);
- void (*free_query_data)(void *ptr);
+ void (*free_query_data)(void *ptr); /**< do not use ordinary free() */
/* mutable variables */
unsigned num_vertices;