mesa: Add skeleton implementations of glInvalidateBuffer{Sub,}Data
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 13 Aug 2012 17:27:33 +0000 (10:27 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 14 Aug 2012 21:39:33 +0000 (14:39 -0700)
commitf241ffd48c2063557461f5b7bb2dea0b744b8bef
tree746d191327d35808943c3eea4096c0f80e77a9b0
parente2370bcc1ddde84d5d1ff676c29638645cb21731
mesa: Add skeleton implementations of glInvalidateBuffer{Sub,}Data

These are part of GL_ARB_invalidate_subdata (but not OpenGL ES 3.0).

v2: Use _mesa_bufferobj_mapped instead of testing
gl_buffer_object::Pointer as suggested by Brian.  Also use
_mesa_is_desktop_gl as suggested by Ken.

v3: Add a comment by the map subrange / discard range overlap test and
fix an off-by-one error noticed by Ken.

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