aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pbo.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
commit1e90ede4237374dfbb2c8c506a906233bcfd3c5d (patch)
tree13b59b0ab2715fd0bb9eea788c73b08f3b07c01e /mesalib/src/mesa/main/pbo.c
parentbaf98f9bb36f956245d83ecd04f90625d6d68d2b (diff)
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.gz
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.bz2
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/include/os.h
Diffstat (limited to 'mesalib/src/mesa/main/pbo.c')
-rw-r--r--mesalib/src/mesa/main/pbo.c13
1 files changed, 13 insertions, 0 deletions
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)