nine: Add state tracker nine for Direct3D9

Work of Joakim Sindholt (zhasha) and Christoph Bumiller (chrisbmr).
v2 Small fixies and sync with latest Mesa by David Heidelberger (okias).
v3 Build improvements by Emil Velikov (xexaxo).
v4 Modified to use directly PIPE_CAP_VIDEO_MEMORY
instead of PIPE_CAP_DEVICE_MEMORY_SIZE.
v5 Merged few small fixes by okias
v6 define to not use indirect drawing
v7 allow D3DLOCK_NOOVERWRITE for LockRect, make Osu game works
v8 build fixes by okias
v9 build fix without opencl by mannerov
v10 build fix after configure.ac changes by okias
v11 clean up fixes by okias
v12 move alpha_blend out until nouveau changes get merged

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

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: improve code readability

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

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
nvc0: fix incorrect flipping

This change fixes few OpenGL apps.

Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
nv50,nvc0: handle TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION
nv50,nvc0: handle NULL vertex elements without fallback
nv50/ir/tgsi: implement TGSI_OPCODE_NRM,DP2A

Used by d3d9 st.
hack/nv50: don't emit buffer for skipped vertex elements

Grr, should forbid that and insert dummy elements in nine.
hack/nvc0: avoid fault in get_query_result if there was no begin_query
nv50: support for hackish viewport bypass
nv50,nvc0: d3d9 requires transfer stride to be aligned to 4
gallium: add blending to pipe blit

Following nouveau commit make use of these.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
nvc0: use blending to pipe blit
nvc0: NULL vertex buffers are allowed
nv50/ir/tgsi: handle TGSI_OPCODE_CND
nvc0: reset constant vertex attribute data after blit

To make wine's test_vshader_input happy.
nvc0: add fast-path for constant buffer upload

Saves a memcpy, and increased threshold for push method, which is
usually better because there's no subchannel switch.

Reviewed-by: David Heidelberger <david.heidelberger@ixit.cz>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
Author: Christoph Bumiller <christoph.bumiller@speed.at>