[OpenGL] Ensure that framebuffer is valid when generating mipmaps.

By spec, the texture level for a framebuffer attachment must be
within the range of [BASE_LEVEL, MAX_LEVEL], so we need to set
MAX_LEVEL to be at least the value of the level we want to render to.

Bug: chromium:1463432
Change-Id: Iabb34b131d84c33228881637d46891cb7ecb5747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/721257
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
1 file changed