mesa: print more info in buffer_object_subdata_range_good() error message
authorBrian Paul <brianp@vmware.com>
Wed, 4 Jan 2012 21:15:53 +0000 (14:15 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 5 Jan 2012 15:14:26 +0000 (08:14 -0700)
src/mesa/main/bufferobj.c

index cc6f6753dbf8efd4eaec4874f7b916d971db7a0e..66957e46d881c300631bd0ba8e2654b2367056ef 100644 (file)
@@ -184,7 +184,10 @@ buffer_object_subdata_range_good( struct gl_context * ctx, GLenum target,
    }
    if (offset + size > bufObj->Size) {
       _mesa_error(ctx, GL_INVALID_VALUE,
-                 "%s(size + offset > buffer size)", caller);
+                 "%s(offset %lu + size %lu > buffer size %lu)", caller,
+                  (unsigned long) offset,
+                  (unsigned long) size,
+                  (unsigned long) bufObj->Size);
       return NULL;
    }
    if (_mesa_bufferobj_mapped(bufObj)) {