This is a major re-work of the __indirect_glInterleavedArrays routine.	The big, ugly, error prone switch-statement is replaced with a compact table. I also added numerous comments, including a comment explaining how the format parameter is validated.
This is a major re-work of the __indirect_glInterleavedArrays routine.	The
big, ugly, error prone switch-statement is replaced with a compact table.
I also added numerous comments, including a comment explaining how the
format parameter is validated.

Explicitly pass GL_FLOAT as the type in the cases where that is the only
possible value (e.g., everywhere except the call to glColorPointer).

Validate that stride is >= 0.

Tested with all modes (including the two error modes) of
progs/tests/interleave.c.

Bug: #5001, #5058
Reviewed by: Brian Paul

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