mesa: Round float param in glTexparameterf() to nearest integer
mesa: Round float param in glTexparameterf() to nearest integer

OpenGL 4.2 specification suggests rounding the float data to nearest
integer when the type of internal state is integer. Out of range floats
should be clamped to {INT_MIN, INT_MAX}. This is not specified anywhere
in gl/gles spec but below test expects this behavior.  This patch makes
gles3 conformance sgis_texture_lod_basic_getter.test pass.

A GL spec bug will be raised to include clamping of out of range floats.

V2: Round float to nearest integer for all cases where
_mesa_Texparameterf() converts float param to int. Use the same block of
float to int conversion code for GL_TEXTURE_SWIZZLE_{R,G,B,A}_EXT cases
as well.

Signed-off-by: Anuj Phogat <e2026475996c48f0b97fd37e84129b3912980428@gmail.com>
Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>

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