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>