diff options
author | marha <marha@users.sourceforge.net> | 2011-09-20 08:40:57 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-20 08:40:57 +0200 |
commit | 0470a59df89ab453bdbe0fc2f820278cfffdc61c (patch) | |
tree | 5482d527c8426219414edc60d3891764ca2b1a20 /mesalib/src/mesa/main/bufferobj.c | |
parent | b2c925e360e2c366526de15b44603f855f94139c (diff) | |
download | vcxsrv-0470a59df89ab453bdbe0fc2f820278cfffdc61c.tar.gz vcxsrv-0470a59df89ab453bdbe0fc2f820278cfffdc61c.tar.bz2 vcxsrv-0470a59df89ab453bdbe0fc2f820278cfffdc61c.zip |
libX11 libxtrans mesa git update 20 sep 2011
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.c')
-rw-r--r-- | mesalib/src/mesa/main/bufferobj.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index a30340174..99edb1ade 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -1376,6 +1376,17 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, return NULL; } + if (access & ~(GL_MAP_READ_BIT | + GL_MAP_WRITE_BIT | + GL_MAP_INVALIDATE_RANGE_BIT | + GL_MAP_INVALIDATE_BUFFER_BIT | + GL_MAP_FLUSH_EXPLICIT_BIT | + GL_MAP_UNSYNCHRONIZED_BIT)) { + /* generate an error if any undefind bit is set */ + _mesa_error(ctx, GL_INVALID_VALUE, "glMapBufferRange(access)"); + return NULL; + } + if ((access & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)) == 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "glMapBufferRange(access indicates neither read or write)"); |