From 9f986778bd4393c5a9108426969d45aa7f10f334 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 19 Oct 2011 10:44:43 +0200 Subject: libX11 libXext libXft mesa libxcb mkfontscale pixman xserver xkeyboard-config git update 19 oct 2011 --- mesalib/src/mesa/main/pbo.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mesalib/src/mesa/main/pbo.c') diff --git a/mesalib/src/mesa/main/pbo.c b/mesalib/src/mesa/main/pbo.c index 4e7e6f925..41ff2ff44 100644 --- a/mesalib/src/mesa/main/pbo.c +++ b/mesalib/src/mesa/main/pbo.c @@ -82,6 +82,19 @@ _mesa_validate_pbo_access(GLuint dimensions, } else { offset = ptr; sizeAddr = ((const GLubyte *) 0) + pack->BufferObj->Size; + /* The ARB_pixel_buffer_object spec says: + * "INVALID_OPERATION is generated by ColorTable, ColorSubTable, + * ConvolutionFilter2D, ConvolutionFilter1D, SeparableFilter2D, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, and DrawPixels if the current + * PIXEL_UNPACK_BUFFER_BINDING_ARB value is non-zero and the data + * parameter is not evenly divisible into the number of basic machine + * units needed to store in memory a datum indicated by the type + * parameter." + */ + if (type != GL_BITMAP && + ((GLintptr)offset % _mesa_sizeof_packed_type(type))) + return GL_FALSE; } if (sizeAddr == 0) -- cgit v1.2.3