glsl/linker: Reduce scope of non-flat integer varying fix.

In the mailing list discussion of "glsl/linker: fix varying packing
for non-flat integer varyings." (commit 7862bde), we concluded that
since the bug only applies to integral variables, it is safer to just
apply the bug fix to integer varyings.  I forgot to make the change
before pushing the patch upstream.  (Note: we aren't aware of any bugs
in commit 7862bde; it just seems wise to be on the safe side).

This patch makes the change.  Assuming commit 7862bde gets
cherry-picked back to 9.1, this commit should be cherry-picked too.

NOTE: This is a candidate for the 9.1 release branch.
i965/blorp: Remove unnecessary test in gen7_blorp_emit_depth_stencil_config.

gen7_blorp_emit_depth_stencil_config() is only called when
params->depth.mt is non-null.  Therefore, it's not necessary to do an
"if (params->depth.mt)" test inside it.  The presence of this if test
was misleading static analysis tools (and briefly, me) into thinking
that gen7_blorp_emit_depth_stencil_config() might sometimes access
uninitialized data and dereference a null pointer.
i965: Only use brw_draw.c's trim() function when necessary.

brw_draw.c contains a trim() function which modifies the vertex count
for quads and quad strips in order to discard dangling vertices.  In
principle this shouldn't be necessary, since hardware since Gen4 is
capable of discarding dangling vertices by itself.  However, it's
necessary because as a hack to speed up rendering on Gen 4-5, we
sometimes convert quads to trifans and quad strips to tristrips.  The
trim() function isn't necessary on Gen6 and up.

This patch documents why and when the trim() function is necessary,
and avoids calling it when it's not needed.

This will avoid creating problems when we enable hardware support for
primitive restart of quads and quad strips on Haswell.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965/gen7.5: Allow HW primitive restart for all primitive types.

Gen7.5 (Haswell) hardware supports primitive restart for all primitive
types.  It also handles all possible primitive restart indices.
Rather than specialize both can_cut_index_handle_restart_index() and
the switch statement in can_cut_index_handle_prims() for Haswell, just
return early if the hardware is Haswell because we know it can handle
everything.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Use software primitive restart when transform feedback active.

When transform feedback is active, the driver manually counts the
number of primitives that run through the pipeline, so that if a batch
buffer flush happens, the next batch buffer can pick up transform
feedback where the last batch buffer left off.  Hardware-accelerated
primitive restart interferes with this process (because it makes the
primitive count depend not just on the number of vertices entering the
pipeline, but also on the contents of the index buffer).  So, when
transform feedback is active, we need to fall back to the software
implementation of primitive restart.

Fixes piglit test "spec/!OpenGL 3.1/primitive-restart-xfb flush".

NOTE: This is a candidate for stable release branches.