draw: (trivial) fix clamping of viewport index
draw: (trivial) fix clamping of viewport index

The old logic would let all negative values go through unclamped, with
potentially disastrous results (probably trying to fetch viewport values
from random memory locations). GL has undefined rendering for vp indices
outside valid range but that's a bit too undefined...
(The logic is now the same as in llvmpipe.)

CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>

Reviewed-by: Jose Fonseca <61b5a29db2c0650f7c8510f93eece059c1b09320@vmware.com>
Reviewed-by: Ilia Mirkin <bcbbb7aa705ec3a5fc5824c01a845186c3d62fca@alum.mit.edu>
Tested-by: Ilia Mirkin <bcbbb7aa705ec3a5fc5824c01a845186c3d62fca@alum.mit.edu>

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