fixup: dont introduce bogus handling of MAX_LEVEL
mesa: extract _mesa_is_legal_tex_storage_format helper
immutable error checks