summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-11 10:10:45 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-11 10:10:45 -0700
commit45230b4e082473f7e1f0c0a18dd0e2fc9e5508e1 (patch)
treefcccaf21cc72789f8b064a33e8cbdd5618fe4a65 /src/mesa
parent1217d5cca3503103cc40221ea8287960236e3734 (diff)
Fix malloc size buf, silence signed/unsigned comparision warning
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/pipe/draw/draw_vbuf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/pipe/draw/draw_vbuf.c b/src/mesa/pipe/draw/draw_vbuf.c
index 3f6606de86..62aa6de68f 100644
--- a/src/mesa/pipe/draw/draw_vbuf.c
+++ b/src/mesa/pipe/draw/draw_vbuf.c
@@ -275,7 +275,7 @@ vbuf_flush_indices( struct draw_stage *stage )
if(!vbuf->nr_indices)
return;
- assert(vbuf->vertex_ptr - vbuf->vertices ==
+ assert((uint) (vbuf->vertex_ptr - vbuf->vertices) ==
vbuf->nr_vertices * vbuf->vertex_size / sizeof(unsigned));
switch(vbuf->prim) {
@@ -405,7 +405,8 @@ struct draw_stage *draw_vbuf_stage( struct draw_context *draw,
assert(render->max_indices < UNDEFINED_VERTEX_ID);
vbuf->max_indices = render->max_indices;
- vbuf->indices = align_malloc( vbuf->max_indices, 16 );
+ vbuf->indices
+ = align_malloc( vbuf->max_indices * sizeof(vbuf->indices[0]), 16 );
vbuf->vertices = NULL;
vbuf->vertex_ptr = vbuf->vertices;