aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-12 08:43:13 +0200
committermarha <marha@users.sourceforge.net>2012-06-12 08:43:13 +0200
commit669b562a737c9418c53bfae69c0dbf1aabe318b4 (patch)
tree3689f9b209df6a4b74eb185f202286e435c71538 /mesalib/src/mesa/main/bufferobj.c
parent59afae8769ef1f757929421e7f55449d5f6b5baf (diff)
parent925b68a7b26823fdfa1cb25d3edc3545fc2175b1 (diff)
downloadvcxsrv-669b562a737c9418c53bfae69c0dbf1aabe318b4.tar.gz
vcxsrv-669b562a737c9418c53bfae69c0dbf1aabe318b4.tar.bz2
vcxsrv-669b562a737c9418c53bfae69c0dbf1aabe318b4.zip
Merge remote-tracking branch 'origin/released'
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 a6a269330..3f7db8605 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)",