summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_elts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_elts.c b/src/gallium/auxiliary/draw/draw_pt_elts.c
index b7780fb5073..88f4d9f495a 100644
--- a/src/gallium/auxiliary/draw/draw_pt_elts.c
+++ b/src/gallium/auxiliary/draw/draw_pt_elts.c
@@ -54,7 +54,8 @@ static unsigned elt_ubyte( const void *elts, unsigned idx )
static unsigned elt_vert( const void *elts, unsigned idx )
{
- return (const ubyte *)elts - (const ubyte *)NULL + idx;
+ /* unsigned index is packed in the pointer */
+ return (unsigned)(uintptr_t)elts + idx;
}
pt_elt_func draw_pt_elt_func( struct draw_context *draw )