diff options
author | Brian Paul <[email protected]> | 2004-11-10 15:46:52 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-11-10 15:46:52 +0000 |
commit | 60909388ab136d849d99eab49e782a53772a618f (patch) | |
tree | 84a981ea2e79b5e6477d05991119a23efa4429a5 /src/mesa/main/bufferobj.c | |
parent | f00d7edd746e4d1eec2d497419f21fb3b04f8bd4 (diff) |
GL_(UN)PACK_SKIP_IMAGES should only be applied to 3D texture pack/unpacking
and ignored for 1D and 2D images.
Need to pass in image dimensions (1,2,3) to the _mesa_image_address() function.
This change gets propogated to some other routines.
Also added new _mesa_image_address[123]d() convenience functions.
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c795d2f16a0..990d2d15a9b 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -429,7 +429,8 @@ _mesa_init_buffer_objects( GLcontext *ctx ) * go out of bounds. */ GLboolean -_mesa_validate_pbo_access(const struct gl_pixelstore_attrib *pack, +_mesa_validate_pbo_access(GLuint dimensions, + const struct gl_pixelstore_attrib *pack, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *ptr) { @@ -442,11 +443,11 @@ _mesa_validate_pbo_access(const struct gl_pixelstore_attrib *pack, return GL_FALSE; /* get address of first pixel we'll read */ - start = _mesa_image_address(pack, ptr, width, height, + start = _mesa_image_address(dimensions, pack, ptr, width, height, format, type, 0, 0, 0); /* get address just past the last pixel we'll read */ - end = _mesa_image_address(pack, ptr, width, height, + end = _mesa_image_address(dimensions, pack, ptr, width, height, format, type, depth-1, height-1, width); |