nouveau/video: make sure that firmware is present when checking caps

Apparently some players are ill-prepared for us claiming that a decoder
exists only to have creating it fail, and express this poor preparation
with crashes (e.g. flash). Check that firmware is there to increase the
chances of there being a high correlation between reported capabilities
and ability to create a decoder.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 10.0 10.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
nv50: implement multiple viewports/scissors, enable ARB_viewport_array

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
nv30: don't overwrite blend color setting for r32/r16 float formats

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv30: report 8 maximum inputs

nvfx_fragprog_assign_generic only allows for up to 10/8 texcoords for
nv40/nv30. This fixes compilation of the varying-packing tests.
Furthermore it appears that the last 2 inputs on nv4x don't seem to
work in those tests, so just report 8 everywhere.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 9.1 9.2 10.0 10.1 <mesa-stable@lists.freedesktop.org>
nv30: allow vbo's with 0 elements

Fixes bin/pos-array piglit test.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
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>
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>
nvc0: don't allow predicates on emit/restart