diff options
author | Erik Faye-Lund <[email protected]> | 2019-08-08 14:01:57 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-08-15 20:23:39 +0200 |
commit | ecd312be96d417e70eaf4717fe64912ecbe8f713 (patch) | |
tree | c2e0e1623431bc6ba4b5f93dfe59e5a75f05b59b | |
parent | c646cd4bac0999547cb61a04f8e80f828d373232 (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/mesa/main/draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 98948a616f1..bfa318553f6 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -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, |