radeon: don't emit VGT_STRMOUT_BUFFER_BASE on SI

The register doesn't exist on SI.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeon: don't emit streamout state if there are no streamout buffers

This could happen if set_stream_output_targets is called twice
in a row without a draw call in between.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: integrate shared streamout state

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: initialize the first CS like any other

So that the "init" state is always emitted first and not later in draw_vbo.

This fixes streamout where the "init" state, which disables streamout,
was emitted in draw_vbo after streamout was enabled.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: handle rasterizer_discard and set GS_OUT_PRIM_TYPE

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: bind streamout buffers to VGT and the vertex shader

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: implement streamout flush properly

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: fix streamout queries

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: implement glDrawTransformFeedback functionality

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: implement streamout shader support

The shader is responsible for writing to streamout buffers using
the TBUFFER_STORE_FORMAT_* instructions.

The locations of some input SGPRs and VGPRs are assigned dynamically, because
the input SGPRs controlling streamout are not declared if they are not needed,
decreasing the indices of all following inputs.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: enable streamout AKA transform feedback for SI

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
gallium: comment that INSTANCEID doesn't include start_instance

Reviewed-by: Christian König <christian.koenig@amd.com>
radeonsi: fix gl_InstanceID with non-zero start_instance

start_instance doesn't affect gl_InstanceID.

There's no piglit test, but it's kinda obvious the code was wrong.

Reviewed-by: Christian König <christian.koenig@amd.com>
radeonsi: fix and enable transform feedback for CIK

The CP_STRMOUT_CNTL register was moved again.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
ilo: Fix out-of-tree build.
Suppress clang's warnings about unused CFLAGS and CXXFLAGS.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac: Save user {C,CXX}FLAGS and append them at end.

This way the user has the privilege of last decision and so the option to build an optimized debug build again.
radeon: Build and use libradeon the right way.

Better build system integration for:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=91a160b
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b2855b

The EGL runtime issue should be fixed now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64810
gallium/targets: Make use of prebuilt libdricommon.la.
Drop support for --enable-static / --disable-shared.