aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_push.c
diff options
context:
space:
mode:
authorXavier Chantry <[email protected]>2010-05-20 19:44:24 +0200
committerChristoph Bumiller <[email protected]>2010-05-20 19:47:12 +0200
commitf2b80e5679741c39b79102e7ee5057d1af9bce82 (patch)
tree45ea1e9d9b59d185b3135bda0cd63c745f6d44d8 /src/gallium/drivers/nv50/nv50_push.c
parent828053726bc4216ad7fd4c4a5665c6ad4c743b49 (diff)
nv50: fixed other void pointer arithmetic errors
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_push.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_push.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_push.c b/src/gallium/drivers/nv50/nv50_push.c
index 244242b8434..c3ac8041462 100644
--- a/src/gallium/drivers/nv50/nv50_push.c
+++ b/src/gallium/drivers/nv50/nv50_push.c
@@ -108,7 +108,7 @@ emit_vertex(struct push_context *ctx, unsigned n)
int i;
if (ctx->edgeflag_attr < 16) {
- float *edgeflag = ctx->attr[ctx->edgeflag_attr].map +
+ float *edgeflag = (uint8_t *)ctx->attr[ctx->edgeflag_attr].map +
ctx->attr[ctx->edgeflag_attr].stride * n;
if (*edgeflag != ctx->edgeflag) {
@@ -120,7 +120,8 @@ emit_vertex(struct push_context *ctx, unsigned n)
BEGIN_RING_NI(chan, tesla, NV50TCL_VERTEX_DATA, ctx->vtx_size);
for (i = 0; i < ctx->attr_nr; i++)
- ctx->attr[i].push(chan, ctx->attr[i].map + ctx->attr[i].stride * n);
+ ctx->attr[i].push(chan,
+ (uint8_t *)ctx->attr[i].map + ctx->attr[i].stride * n);
}
static void
@@ -243,14 +244,14 @@ nv50_push_elements_instanced(struct pipe_context *pipe,
assert(bo->map);
return;
}
- ctx.attr[n].map = bo->map + vb->buffer_offset + ve->src_offset;
+ ctx.attr[n].map = (uint8_t *)bo->map + vb->buffer_offset + ve->src_offset;
nouveau_bo_unmap(bo);
ctx.attr[n].stride = vb->stride;
ctx.attr[n].divisor = ve->instance_divisor;
if (ctx.attr[n].divisor) {
ctx.attr[n].step = i_start % ve->instance_divisor;
- ctx.attr[n].map += i_start * vb->stride;
+ ctx.attr[n].map = (uint8_t *)ctx.attr[n].map + i_start * vb->stride;
}
size = util_format_get_component_bits(ve->src_format,
@@ -331,7 +332,7 @@ nv50_push_elements_instanced(struct pipe_context *pipe,
ctx.attr[i].divisor != ++ctx.attr[i].step)
continue;
ctx.attr[i].step = 0;
- ctx.attr[i].map += ctx.attr[i].stride;
+ ctx.attr[i].map = (uint8_t *)ctx.attr[i].map + ctx.attr[i].stride;
}
u_split_prim_init(&s, mode, start, count);