aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-12 08:30:03 +0200
committermarha <marha@users.sourceforge.net>2012-06-12 08:30:03 +0200
commit925b68a7b26823fdfa1cb25d3edc3545fc2175b1 (patch)
tree57c1e15fcc492bdc9b9cfd195e552c69aba845ce /mesalib/src/mesa/main/bufferobj.c
parent567cbd4acc1e35ae40d99b24bb321d97632399db (diff)
downloadvcxsrv-925b68a7b26823fdfa1cb25d3edc3545fc2175b1.tar.gz
vcxsrv-925b68a7b26823fdfa1cb25d3edc3545fc2175b1.tar.bz2
vcxsrv-925b68a7b26823fdfa1cb25d3edc3545fc2175b1.zip
fontconfig mesa pixman git update 12 Juni 2012
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.c')
-rw-r--r--mesalib/src/mesa/main/bufferobj.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index 541566509..332af3d36 100644
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/src/mesa/main/bufferobj.c
@@ -848,6 +848,10 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
_mesa_BindBufferARB( GL_PIXEL_UNPACK_BUFFER_EXT, 0 );
}
+ if (ctx->Texture.BufferObject == bufObj) {
+ _mesa_BindBufferARB( GL_TEXTURE_BUFFER, 0 );
+ }
+
/* The ID is immediately freed for re-use */
_mesa_HashRemove(ctx->Shared->BufferObjects, ids[i]);
/* Make sure we do not run into the classic ABA problem on bind.
@@ -1360,6 +1364,12 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
return;
}
+ if (size < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyBufferSubData(writeOffset = %d)", (int) size);
+ return;
+ }
+
if (readOffset + size > src->Size) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glCopyBufferSubData(readOffset + size = %d)",