From 2fe2056807d1304de86deb2b59992d51d9252ad0 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 26 Jun 2013 15:01:24 +0200 Subject: libXext mesa git update 29 June 20013 libXext commit 7378d4bdbd33ed49ed6cfa5c4f73d7527982aab4 mesa commit 9aebad618c0aab527a0b838ce0a79ffa6dd426bb --- mesalib/src/gallium/auxiliary/hud/hud_cpu.c | 12 +++++++++++- mesalib/src/gallium/auxiliary/hud/hud_fps.c | 12 +++++++++++- mesalib/src/gallium/auxiliary/hud/hud_private.h | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/hud') 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; -- cgit v1.2.3 From ced1a6b8f5a750fcd3b8d3d0d9bbdee830064e6c Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 28 Jun 2013 16:47:15 +0200 Subject: fontconfig mesa git update 28 June 2013 fontconfig commit 197d06c49b01413303f2c92130594daa4fcaa6ad mesa commit 24b05ff1581b612ab6dbf4937fa4b644b4e61379 --- mesalib/src/gallium/auxiliary/hud/hud_context.c | 100 ++++++++++++------------ mesalib/src/gallium/auxiliary/hud/hud_fps.c | 2 +- 2 files changed, 52 insertions(+), 50 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/hud') diff --git a/mesalib/src/gallium/auxiliary/hud/hud_context.c b/mesalib/src/gallium/auxiliary/hud/hud_context.c index 981708314..47566d816 100644 --- a/mesalib/src/gallium/auxiliary/hud/hud_context.c +++ b/mesalib/src/gallium/auxiliary/hud/hud_context.c @@ -33,6 +33,8 @@ * Set GALLIUM_HUD=help for more info. */ +#include + #include "hud/hud_context.h" #include "hud/hud_private.h" #include "hud/font.h" @@ -106,8 +108,8 @@ hud_draw_colored_prims(struct hud_context *hud, unsigned prim, hud->constants.color[1] = g; hud->constants.color[2] = b; hud->constants.color[3] = a; - hud->constants.translate[0] = xoffset; - hud->constants.translate[1] = yoffset; + hud->constants.translate[0] = (float) xoffset; + hud->constants.translate[1] = (float) yoffset; hud->constants.scale[0] = 1; hud->constants.scale[1] = yscale; cso_set_constant_buffer(cso, PIPE_SHADER_VERTEX, 0, &hud->constbuf); @@ -127,10 +129,10 @@ hud_draw_colored_quad(struct hud_context *hud, unsigned prim, float r, float g, float b, float a) { float buffer[] = { - x1, y1, - x1, y2, - x2, y2, - x2, y1, + (float) x1, (float) y1, + (float) x1, (float) y2, + (float) x2, (float) y2, + (float) x2, (float) y1, }; hud_draw_colored_prims(hud, prim, buffer, 4, r, g, b, a, 0, 0, 1); @@ -145,17 +147,17 @@ hud_draw_background_quad(struct hud_context *hud, assert(hud->bg.num_vertices + 4 <= hud->bg.max_num_vertices); - vertices[num++] = x1; - vertices[num++] = y1; + vertices[num++] = (float) x1; + vertices[num++] = (float) y1; - vertices[num++] = x1; - vertices[num++] = y2; + vertices[num++] = (float) x1; + vertices[num++] = (float) y2; - vertices[num++] = x2; - vertices[num++] = y2; + vertices[num++] = (float) x2; + vertices[num++] = (float) y2; - vertices[num++] = x2; - vertices[num++] = y1; + vertices[num++] = (float) x2; + vertices[num++] = (float) y1; hud->bg.num_vertices += num/2; } @@ -200,25 +202,25 @@ hud_draw_string(struct hud_context *hud, unsigned x, unsigned y, assert(hud->text.num_vertices + num/4 + 4 <= hud->text.max_num_vertices); - vertices[num++] = x1; - vertices[num++] = y1; - vertices[num++] = tx1; - vertices[num++] = ty1; + vertices[num++] = (float) x1; + vertices[num++] = (float) y1; + vertices[num++] = (float) tx1; + vertices[num++] = (float) ty1; - vertices[num++] = x1; - vertices[num++] = y2; - vertices[num++] = tx1; - vertices[num++] = ty2; + vertices[num++] = (float) x1; + vertices[num++] = (float) y2; + vertices[num++] = (float) tx1; + vertices[num++] = (float) ty2; - vertices[num++] = x2; - vertices[num++] = y2; - vertices[num++] = tx2; - vertices[num++] = ty2; + vertices[num++] = (float) x2; + vertices[num++] = (float) y2; + vertices[num++] = (float) tx2; + vertices[num++] = (float) ty2; - vertices[num++] = x2; - vertices[num++] = y1; - vertices[num++] = tx2; - vertices[num++] = ty1; + vertices[num++] = (float) x2; + vertices[num++] = (float) y1; + vertices[num++] = (float) tx2; + vertices[num++] = (float) ty1; x += hud->font.glyph_width; s++; @@ -316,25 +318,25 @@ hud_pane_accumulate_vertices(struct hud_context *hud, /* draw border */ assert(hud->whitelines.num_vertices + num/2 + 8 <= hud->whitelines.max_num_vertices); - line_verts[num++] = pane->x1; - line_verts[num++] = pane->y1; - line_verts[num++] = pane->x2; - line_verts[num++] = pane->y1; - - line_verts[num++] = pane->x2; - line_verts[num++] = pane->y1; - line_verts[num++] = pane->x2; - line_verts[num++] = pane->y2; - - line_verts[num++] = pane->x1; - line_verts[num++] = pane->y2; - line_verts[num++] = pane->x2; - line_verts[num++] = pane->y2; - - line_verts[num++] = pane->x1; - line_verts[num++] = pane->y1; - line_verts[num++] = pane->x1; - line_verts[num++] = pane->y2; + line_verts[num++] = (float) pane->x1; + line_verts[num++] = (float) pane->y1; + line_verts[num++] = (float) pane->x2; + line_verts[num++] = (float) pane->y1; + + line_verts[num++] = (float) pane->x2; + line_verts[num++] = (float) pane->y1; + line_verts[num++] = (float) pane->x2; + line_verts[num++] = (float) pane->y2; + + line_verts[num++] = (float) pane->x1; + line_verts[num++] = (float) pane->y2; + line_verts[num++] = (float) pane->x2; + line_verts[num++] = (float) pane->y2; + + line_verts[num++] = (float) pane->x1; + line_verts[num++] = (float) pane->y1; + line_verts[num++] = (float) pane->x1; + line_verts[num++] = (float) pane->y2; /* draw horizontal lines inside the graph */ for (i = 0; i <= 5; i++) { diff --git a/mesalib/src/gallium/auxiliary/hud/hud_fps.c b/mesalib/src/gallium/auxiliary/hud/hud_fps.c index 6e9be712b..a360bc2ed 100644 --- a/mesalib/src/gallium/auxiliary/hud/hud_fps.c +++ b/mesalib/src/gallium/auxiliary/hud/hud_fps.c @@ -52,7 +52,7 @@ query_fps(struct hud_graph *gr) info->frames = 0; info->last_time = now; - hud_graph_add_value(gr, fps); + hud_graph_add_value(gr, (uint64_t) fps); } } else { -- cgit v1.2.3