mesa: Don't report types for 0-sized components of textures.
mesa: Don't report types for 0-sized components of textures.

The GL_TEXTURE_WHATEVER_SIZE entrypoints were checking if the
specified base type of the texture allowed that channel to be present
before reporting the size of the channel, so that GL_RGB didn't end up
with an alpha size if the hardware driver had to store it that way.

The GL_TEXTURE_WHATEVER_TYPE entrypoints weren't checking it, so you
would end up with strange responses from the GL involving 0-bit
floating-point alpha components in GL_RGB32F, even though it says
GL_NONE as expected for other 0-sized channels.

Make _TYPE check _BaseFormat the same as _SIZE, which results in
fixing most of the GL_RGB* testcases of gl-3.0-required-sized-formats
pass on i965.

v2: Add a default case with a warning (suggestion by Brian Paul)

Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com> (v1)

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