mesa: do internal format error checking for glTexStorage()