vc4: Add support for rebasing texture levels so firstlevel == 0.

GLES2 doesn't have GL_TEXTURE_BASE_LEVEL, so the hardware doesn't.  Fixes
piglit levelclamp, tex-miplevel-selection, and texture-storage/2D mipmap
rendering.
vc4: Translate 4-byte index buffers to 2 bytes.

Fixes assertion failures in 14 piglit tests (half of which now pass).
tgsi/ureg: add ureg_UARL shortcut

We use it in Gallium Nine code.
mesa/gallium: API settings / rasterization rules

D3D9 has different system coordinate, add neccessary infrastructure for it.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
gallium/drivers: use API settings / rasterization rules

This commit allow drivers use new added infrastructure.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
winsys/sw/wrapper: hook up is_displaytarget_format_supported

Gallium Nine make use of it, because we wrapping around sw screen.
gallium/draw: support hack to disable clipping
util: dlopen change to RTLD_NOW and LOCAL
gallium/auxiliary: implement sw_probe_wrapped

This is useful for resource sharing.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
configure: add configurable pipe-driver location

This option gives better flexibility when using gallium pipe drivers.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
Prefer intrinsics to handrolled atomic ops for Linux (v2)

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

There is posible, that other OS could also benefit from intrinsic.

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

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

Cc: Tom Fogal <tfogal@alumni.unh.edu>
Cc: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
gallium/auxiliary: add inc and dec alternative with return

They're useful for Gallium Nine.

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

For D3D9 is very important have handled intersections and covers.

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

For debugging purposes of Gallium Nine.

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

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

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

This allow forcing VSYNC and setting throttling to find optimal ratio
between framerate and input lag.

Reviewed-by: David Heidelberger <david.heidelberger@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
nine: Implement threadpool

Useful for PRIME setups.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
ilo: Advertise DMA-BUF
nvc0: define numbers, make code better readable

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
nv50/nvc0: use API settings / rasterization rules

Implement D3D9 infrastructure inside NVC0.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>