summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2005-05-05 21:08:07 +0000
committerKarl Schultz <[email protected]>2005-05-05 21:08:07 +0000
commit6258b76c49f49a56a7c713914b798e80c6553b06 (patch)
tree2cc86a17fdda506fc9c86daba7ff3900d2d64996 /src/mesa/main/bufferobj.c
parent203dcb733d36cc91107554b0d323ed8ccef6e105 (diff)
Port Mesa to build on a P64 platform (e.g., Win64). P64 platforms
use 64-bit pointers and 32-bit longs. So, operations like casting pointers to unsigned long and back to pointer won't work. glheader.h now includes files to define uintptr_t, which should instead be used for this sort of operation. It is an integer type that is the same size as a pointer.
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 07b2341ff7a..a1d4c0190a1 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -449,11 +449,11 @@ _mesa_validate_pbo_access(GLuint dimensions,
format, type, depth-1, height-1, width);
- if ((const GLubyte *) start > (const GLubyte *) pack->BufferObj->Size) {
+ if ((const GLubyte *) start > (const GLubyte *)(uintptr_t) pack->BufferObj->Size) {
/* This will catch negative values / wrap-around */
return GL_FALSE;
}
- if ((const GLubyte *) end > (const GLubyte *) pack->BufferObj->Size) {
+ if ((const GLubyte *) end > (const GLubyte *)(uintptr_t) pack->BufferObj->Size) {
/* Image read goes beyond end of buffer */
return GL_FALSE;
}