1 May 2010 01:01
[PATCH] nv50: fixed other void pointer arithmetic errors
Xavier Chantry <chantry.xavier <at> gmail.com>
2010-04-30 23:01:55 GMT
2010-04-30 23:01:55 GMT
scons couldn't build nv50 as it uses -Werror=pointer-arith by default.
Signed-off-by: Xavier Chantry <chantry.xavier <at> gmail.com>
---
src/gallium/drivers/nv50/nv50_push.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_push.c b/src/gallium/drivers/nv50/nv50_push.c
index 244242b..6ebea54 100644
--- a/src/gallium/drivers/nv50/nv50_push.c
+++ b/src/gallium/drivers/nv50/nv50_push.c
<at> <at> -108,7 +108,7 <at> <at> 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) {
<at> <at> -120,7 +120,7 <at> <at> 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
<at> <at> -243,14 +243,14 <at> <at> nv50_push_elements_instanced(struct pipe_context *pipe,
(Continue reading)
RSS Feed