st/mesa: use table-driven approach to exposing extensions for formats (v3)
st/mesa: use table-driven approach to exposing extensions for formats (v3)

The check for ctx->API was unnecessary, because OES extensions are not exposed
in desktop GL.

Also require renderbuffer support for ARB_texture_rgb10_a2ui,
as per the spec.

Tested by comparing old and new glxinfo with softpipe and r600g.

v2: fix bugs
v3: rename need_only_one -> need_at_least_one
    rename num_elements -> num_mappings
    add comments
    use const when appropriate

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

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