st/mesa: use PIPE_BIND_DISPLAY_TARGET when checking for sRGB capability

When we're checking if the framebuffer is sRGB capable, call
is_format_supported() with the PIPE_BIND_DISPLAY_TARGET flag.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
vc4: Fix a couple missing '\n's in error output.
vc4: Add .dir-locals.el for kernel style in the kernel code.
vc4: Don't forget to validate code that's got PROG_END on it.

This signal doesn't terminate the program now, it terminates the program
soon.  So you have to actually validate the code in the instruction.
vc4: Drop redundant check for is_tmu_write().

This function is only called when it would return true.
vc4: Fix mixup of return type in reloc_tex().
vc4: Add support for ARL and indirect register access on TGSI_FILE_CONSTANT.

Fixes 14 ARB_vp tests (which had no lowering done), and should improve
performance of indirect uniform array access in GLSL.
mesa: Fix order of errors for glDrawTransformFeedbackStream

The OpenGL 4.0 core profile specification, section 2.17.3
Transform Feedback Draw Operations says:

   "The error INVALID_VALUE is generated if <stream> is greater
    than or equal to the value of MAX_VERTEX_STREAMS.
    ...
    The error INVALID_OPERATION
    is generated if EndTransformFeedback has never been called
    while the object named by id was bound."

Fixes the piglit test:
   ARB_transform_feedback3/arb_transform_feedback3-draw_using_invalid_stream_index
   (with the test itself fixed to eliminate an unrelated failure)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
radeon/llvm: Dynamically allocate branch/loop stack arrays

This prevents us from silently overflowing the stack arrays, and allows
arbitrary stack depths.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85454

Cc: mesa-stable@lists.freedesktop.org
Reported-and-Tested-by: Nick Sarnie <commendsarnex@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
tgsi/ureg: add ureg_UARL shortcut (v2)

v2: moved in in same order as in p_shader_tokens (thanks Brian)
winsys/sw/wrapper: hook up is_displaytarget_format_supported

Gallium Nine make use of it, because we wrapping around sw screen.
gallium/auxiliary: implement sw_probe_wrapped

This is useful for resource sharing.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
gallium/draw: support hack to disable clipping (v2)

v2: drop ifdef change, which may be send later in separate commit
gallium/auxiliary: Prefer intrinsics to handrolled atomic ops for Linux (v2)

v2: prefer intrinsics only on Linux to avoid compilation problems
    on other platforms [1].

We need this patch, because Gallium Nine use directly intrinsics.
Otherwise build fails.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=30514

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
gallium/auxiliary: add inc and dec alternative with return (v2)

At this moment we use only zero or positive values.

v2: Implement it for also for Solaris, MSVC assembly
    and enable for other combinations.

Solaris use uint (which is fine for Nine) but others use int.
What to do?

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
gallium/auxiliary: add contained and rect checks (v3)

v3: thanks to Brian, improved coding style, also glennk helped spot few
things (unsigned -> int, two constify)

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
gallium/auxiliary: add dump functions for bind and transfer flags

v2: rename and add support for MSVC (thanks to Brian)

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
nine: Add state tracker nine for Direct3D9 (v2)

Work of Joakim Sindholt (zhasha) and Christoph Bumiller (chrisbmr).
DRI3 port done by Axel Davy (mannerov).

v2: - nine_debug.c: klass extended from 32 chars to 96 (for sure)

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
nine: Add drirc options (v2)

Implements vblank_mode and throttling, which  allows us change default ratio
between framerate and input lag.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
nine: buildsystem improvements, convert to static/shared drivers

...and as any other target (according to configure.ac) default to
static one. Why - the shared pipe-drivers bare unstable API/ABI and
can cause additional problems.

Lots to small changes all over with most significant ones:
 - Sort and cleanup the includes
 - Use AM_CPPFLAGS for the defines
 - Add the linker garbage collector
 - Restrict the exported symbols (think llvm)