st/mesa: only set up sampler compare mode for depth textures
st/mesa: only set up sampler compare mode for depth textures

The GL_ARB_shadow spec says the shadow compare mode should have no
effect when sampling a color texture.  As it was, it was up to
drivers to check for that (softpipe, llvmpipe, svga and probably
the rest don't do that).  Note: it looks like DX10 allows shadow
compare with some non-depth formats, so this case really should be
handled in the state tracker.

Reviewed-by: Roland Scheidegger <7d58aee419d6f9201d75517c885374dff5e7d848@vmware.com>

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