nv30: fix confusing fragprog reference to be vertprog

Noticed through code inspection. This doesn't actually matter since vp
textures are presently not enabled.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: rework primid logic

Functionally identical but much simpler. Should also better integrate
with future layer/viewport changes/fixes.

Cc: 10.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: fix layerid to be the fp input number rather than vp output number

In the tests they were the same so it didn't matter, but indications are
that this is the correct behaviour. Also take this opportunity to
(trivially) support using gl_Layer in fp.

Cc: 10.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: implement multiple viewports/scissors, enable ARB_viewport_array

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
st/mesa: add support for viewport index semantic

This adds GS output and FS input support, even though FS input
support isn't supported until GLSL 4.30 from what I can see.

Signed-off-by: Dave Airlie <airlied@redhat.com>
st/mesa: add support for GL_ARB_viewport_array (v0.2)

this just ties the mesa code to the pre-existing gallium interface,
I'm not sure what to do with the CSO stuff yet.

0.2: fix min/max bounds

Signed-off-by: Dave Airlie <airlied@redhat.com>