aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/gallium/auxiliary')
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_context.c100
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_fps.c2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_linkage.c4
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_prim.h4
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_slab.c2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_staging.c4
6 files changed, 59 insertions, 57 deletions
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 <stdio.h>
+
#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 {
diff --git a/mesalib/src/gallium/auxiliary/util/u_linkage.c b/mesalib/src/gallium/auxiliary/util/u_linkage.c
index 2f6f41ba8..245d941dc 100644
--- a/mesalib/src/gallium/auxiliary/util/u_linkage.c
+++ b/mesalib/src/gallium/auxiliary/util/u_linkage.c
@@ -130,12 +130,12 @@ util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_
last = i;
}
- if(last < efficient_slots)
+ if (last < (int) efficient_slots)
{
UTIL_SEMANTIC_SET_FOR_EACH(i, set)
layout[i] = i;
}
- else if((last - first) < efficient_slots)
+ else if ((last - first) < (int) efficient_slots)
{
UTIL_SEMANTIC_SET_FOR_EACH(i, set)
layout[i - first] = i;
diff --git a/mesalib/src/gallium/auxiliary/util/u_prim.h b/mesalib/src/gallium/auxiliary/util/u_prim.h
index 8f444a305..8a9cca20a 100644
--- a/mesalib/src/gallium/auxiliary/util/u_prim.h
+++ b/mesalib/src/gallium/auxiliary/util/u_prim.h
@@ -38,8 +38,8 @@ extern "C" {
#endif
struct u_prim_vertex_count {
- int min;
- int incr;
+ unsigned min;
+ unsigned incr;
};
/**
diff --git a/mesalib/src/gallium/auxiliary/util/u_slab.c b/mesalib/src/gallium/auxiliary/util/u_slab.c
index f9f5ef68f..dbdebc6c9 100644
--- a/mesalib/src/gallium/auxiliary/util/u_slab.c
+++ b/mesalib/src/gallium/auxiliary/util/u_slab.c
@@ -55,7 +55,7 @@ static void util_slab_add_new_page(struct util_slab_mempool *pool)
{
struct util_slab_page *page;
struct util_slab_block *block;
- int i;
+ unsigned i;
page = MALLOC(pool->page_size);
insert_at_tail(&pool->list, page);
diff --git a/mesalib/src/gallium/auxiliary/util/u_staging.c b/mesalib/src/gallium/auxiliary/util/u_staging.c
index b5e37932e..b569c8f99 100644
--- a/mesalib/src/gallium/auxiliary/util/u_staging.c
+++ b/mesalib/src/gallium/auxiliary/util/u_staging.c
@@ -84,7 +84,7 @@ util_staging_transfer_init(struct pipe_context *pipe,
if (usage & PIPE_TRANSFER_READ)
{
/* XXX this looks wrong dst is always the same but looping over src z? */
- unsigned zi;
+ int zi;
struct pipe_box sbox;
sbox.x = box->x;
sbox.y = box->y;
@@ -111,7 +111,7 @@ util_staging_transfer_destroy(struct pipe_context *pipe, struct pipe_transfer *p
{
if(tx->base.usage & PIPE_TRANSFER_WRITE) {
/* XXX this looks wrong src is always the same but looping over dst z? */
- unsigned zi;
+ int zi;
struct pipe_box sbox;
sbox.x = 0;
sbox.y = 0;