mesa: Check for a negative "size" parameter in glCopyBufferSubData().
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 9 Jun 2012 05:12:23 +0000 (22:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Jun 2012 20:27:36 +0000 (13:27 -0700)
commita75e704326986b85539b6abf2319701e1a3138e9
tree6378c9f229c482e12f98ac57f8bd9e145c5f8262
parent4a5d020ee39576660f72283714822192294323b8
mesa: Check for a negative "size" parameter in glCopyBufferSubData().

From the GL_ARB_copy_buffer spec:
"An INVALID_VALUE error is generated if any of readoffset, writeoffset,
 or size are negative [...]"

Fixes oglconform's copybuffer/negative.CNNegativeValues test.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/bufferobj.c