main: Add utility function _mesa_lookup_bufferobj_err.

This function is exposed to mesa driver internals so that texture buffer
objects and array objects can use it.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2 files changed