Move validation of API errors out of Texture*::generateMipmaps() to the API. TRAC #23959 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods