i965: Make fs gl_PrimitiveID input work even when there's no gs.

When a geometry shader is present, the fragment shader gl_PrimitiveID
input acts like an ordinary varying, receiving data from the gs
gl_PrimitiveID output.  When there's no geometry shader, we have to
ask the fixed function SF hardware to provide the primitive ID to the
fragment shader instead.

Previously, the SF setup code would handle this situation by
recognizing that the FS gl_PrimitiveID input didn't match to any VS
output; since normally an FS input with no corresponding VS output
leads to undefined data, the SF setup code used to just arbitrarily
assign it to receive data from attribute 0.

This patch changes the SF setup code so that instead of arbitrarily
using attribute 0, it assigns the unmatched FS input to receive
gl_PrimitiveID.  In the case where the FS input really is
gl_PrimitiveID, this produces the intended result.  In all other
cases, no harm is done since GL specifies that the behaviour is
undefined.

Fixes piglit test primitive-id-no-gs.

v2: If an attribute is already being overridden with point
coordinates, don't try to also override it with gl_PrimitiveID.  This
is necessary to avoid regressing piglit tests such as
shaders/glsl-fs-pointcoord.

Reviewed-by: Eric Anholt <eric@anholt.net>
glsl: Move error message inside validation check reducing duplicate message handling

v2 (Paul Berry <stereotype441@gmail.com): Fix precedence error in call
to _mesa_glsl_error().

Reviewed-by: Paul Berry <stereotype441@gmail.com>
ilo: minor cleanups for recent interface changes

Kill ilo_bind_sampler_states2 and ilo_set_sampler_views2.  Map
PIPE_FORMAT_R10G10B10A2_UINT to BRW_SURFACEFORMAT_R10G10B10A2_UINT.
vl: add 400 chroma format as well

Signed-off-by: Christian König <christian.koenig@amd.com>
radeon/uvd: fix H264 chroma format handling

Signed-off-by: Christian König <christian.koenig@amd.com>
vl/h264: split fields into SPS/PPS

Add alot of missing fields as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
glsl: Fix comment

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl: whitespace cleanups.

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>

v2 (Paul Berry <stereotype441@gmail.com>): Separate from "glsl: Add
check for unsized arrays to glsl types".

Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl: Add check for unsized arrays to glsl types

The main purpose of this patch is to increase readability of
the array code by introducing is_unsized_array() to glsl_types.
Some redundent is_array() checks are also removed, and small number
of other related clean ups.

The introduction of is_unsized_array() should also make the
ARB_arrays_of_arrays code simpler and more readable when it arrives.

V2: Also replace code that checks for unsized arrays directly with the
length variable

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>

v3 (Paul Berry <stereotype441@gmail.com>): clean up formatting.
Separate whitespace cleanups to their own patch.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
mesa: use void in _mesa_VDPAUFiniNV() as in the header file
mesa: Remove trailing whitespace in texparam.c

Signed-off-by: Rico Schüller <kgbricola@web.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
hi10p: vdpau state tracker patch
hi10p: Auxiliary helpers updated
hi10p: bump libvdpau depends to a version which supports hi10p