mesa: consolidate cube width=height error checking
mesa: consolidate cube width=height error checking

Instead of checking width==height in four places, just do it in
_mesa_legal_texture_dimensions() where we do the other width, height,
depth checks.  Similarly, move the check that cube map array depth is
a multiple of 6.

This change also fixes some missing cube dimension checks for the
glTexStorage[23]D() functions.

Remove width==height assertion in _mesa_get_tex_max_num_levels() since
that's called before the other size checks for glTexStorage.

Cc: "9.2" <59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org>

zz85/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer