mesa/main: avoid warning when casting offset to pointer

This generates a warning on some 64-bit systems, so let's cast to a
properly sized integer first.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Erik Faye-Lund 2019-08-08 14:01:57 +02:00
parent c646cd4bac
commit ecd312be96
1 changed files with 1 additions and 1 deletions

View File

@ -1640,7 +1640,7 @@ _mesa_exec_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect
/* Convert offset to pointer */
void *offset = (void *)
((cmd->firstIndex * _mesa_sizeof_type(type)) & 0xffffffffUL);
(uintptr_t)((cmd->firstIndex * _mesa_sizeof_type(type)) & 0xffffffffUL);
_mesa_exec_DrawElementsInstancedBaseVertexBaseInstance(mode, cmd->count,
type, offset,