mesa: add _mesa_get_and_validate_attachment() helper

Will be used to add KHR_no_error support. We make this available
external so it can be called from meta.

Reviewed-by: Eric Anholt <eric@anholt.net>
2 files changed