nvc0: use API settings / rasterization rules (v2)

v2: dropped part of clip_halfz handling implemented in upstream commit
    3bc42a09e2d13c42e15423a17b5c571049a11224
nv50,nvc0: handle TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION

Allow viewport bypass used by D3D9 applications.
nv50,nvc0: handle NULL vertex elements without fallback

This makes Gallium Nine faster.
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>
nvc0: don't update vbufs that aren't being accessed
nv50: record CB slot for bound constant buffers

So we don't have to re-bind every time a transfer on a bound buffer
is performed, i.e. on all constant uploads with d3d9.
nv50/ir/tgsi: handle TGSI_OPCODE_ARR
nv50/ir/tgsi: implement TGSI_OPCODE_BREAKC
gallium/draw: allow debug code only when specifically requested

Does it interfere with Nine? And how?

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
Clean Resource9 BaseTexture9 Surface9 and Texture9 initialization

And fix a bug with hl2 lost coast.

Signed-off-by: Axel Davy <axel.davy@ens.fr>