[Mesa-dev] [PATCH 20/20] Fix type mismatch between draw_private.h and LLVM
Richard Sandiford
rsandifo at linux.vnet.ibm.com
Tue Jun 4 13:19:41 PDT 2013
draw_vertex_buffer declared the size field to be a size_t, but the LLVM
code used an int32 instead. This caused problems on big-endian 64-bit
targets, because the first 32-bit chunk of the 64-bit size_t was always 0.
In one sense size_t seems like a good choice for a size, so one fix
would have been to try to get the LLVM code to use the equivalent of
size_t too. However, in practice, the size is taken from things like ~0
or width0, both of which are int-sized, so it seemed simpler to make the
size field int-sized as well.
Signed-off-by: Richard Sandiford <rsandifo at linux.vnet.ibm.com>
---
src/gallium/auxiliary/draw/draw_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index f30f9af..adde647 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -71,7 +71,7 @@ struct draw_pt_front_end;
*/
struct draw_vertex_buffer {
const void *map;
- size_t size;
+ uint32_t size;
};
/**
--
1.7.11.7
More information about the mesa-dev
mailing list