From 6b329b9274b18c50f4177eef7ee087d50ebc1525 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 26 Apr 2011 14:54:41 -0600 Subject: Squashed commit of the following: commit 864fe253b04105b7469e5f7b064dc37637b944f8 Author: Brian Paul Date: Thu Apr 21 20:13:07 2011 -0600 mesa: s/exec/disp/ in _mesa_init_histogram_dispatch() This function isn't normally compiled (FEATURE_histogram). commit f4bf45e2b94b582cacd19cdca873c5be627e4250 Author: nobled Date: Thu Apr 21 07:53:58 2011 -0600 mesa: hook up GL_ARB_robustness dispatch functions ...and advertise the extension. Signed-off-by: Brian Paul commit 2b89e38e5f572dc40cebc06381ae7c5d04386998 Author: nobled Date: Thu Apr 21 07:53:58 2011 -0600 mesa: regenerated API files for GL_ARB_robustness Signed-off-by: Brian Paul commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8 Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 glapi: add ARB_robustness xml Signed-off-by: Brian Paul commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9 Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: implement GL_ARB_robustness functions Signed-off-by: Brian Paul commit 938fd71f4c4742f274922d53492a7290ab8d9c9b Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add context fields for GL_ARB_robustness Signed-off-by: Brian Paul commit 72075137bc79e65be03dac7e97b6dba93c3a86a4 Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize more bounds-checking error messages Signed-off-by: Brian Paul commit 32a3fc23746db49da903fbc08afa0135af3007d2 Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize some bounds-checking error messages Signed-off-by: Brian Paul commit cecbf1f4d164207de373dec0cadee2e84e1f9656 Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add more bounds-checking support for client memory buffers Signed-off-by: Brian Paul commit edc895b52383d5bd274422db56adead1d81daf5f Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add bounds-checking support for client memory buffers Signed-off-by: Brian Paul commit 3a96ef28a538f158a219b406cd090dee70470c85 Author: nobled Date: Thu Apr 21 07:53:57 2011 -0600 mesa: use is_bufferobj() helper function Signed-off-by: Brian Paul --- src/mesa/main/drawpix.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa/main/drawpix.c') diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index ee379f71bf5..89c2b26973c 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -90,10 +90,10 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, GLint x = IROUND(ctx->Current.RasterPos[0]); GLint y = IROUND(ctx->Current.RasterPos[1]); - if (ctx->Unpack.BufferObj->Name) { + if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { /* unpack from PBO */ - if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, 1, - format, type, pixels)) { + if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, + 1, format, type, INT_MAX, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(invalid PBO access)"); goto end; @@ -249,11 +249,11 @@ _mesa_Bitmap( GLsizei width, GLsizei height, GLint x = IFLOOR(ctx->Current.RasterPos[0] + epsilon - xorig); GLint y = IFLOOR(ctx->Current.RasterPos[1] + epsilon - yorig); - if (ctx->Unpack.BufferObj->Name) { + if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { /* unpack from PBO */ - if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, 1, - GL_COLOR_INDEX, GL_BITMAP, - (GLvoid *) bitmap)) { + if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, + 1, GL_COLOR_INDEX, GL_BITMAP, + INT_MAX, (const GLvoid *) bitmap)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBitmap(invalid PBO access)"); return; -- cgit v1.2.3