X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fdraw%2Fdraw_pt_elts.c;h=88f4d9f495ac306aa0f0e1ae9138d1b9362c2dcb;hb=f7c2d4fee3104008c21078879cbc5720d7bc1be6;hp=b7780fb5073c5bb68cf5600ae1130bb8dfd89787;hpb=3059ceb7f8128f00846f261f1927f5ec72d5dd15;p=mesa.git 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 )