st/nine: correct rules for relative adressing and constants.

relative adressing for constants is possible only for vs float
constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: remove unused code for ps

Since constant indirect adressing is not allowed for ps,
we can remove our code to handle that.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Fix sm3 relative addressing for non-debug build

Relative addressing needs the constant buffer to get all
the correct constants, even those defined by the shader.

The code to copy the shader constants to the constant buffer
was enabled only for debug build. Enable it always.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Improve fallback when driver doesn't support user buffers.

For now the path updated is only used by Amd drivers, but a later
patch will make it used by all drivers. Some drivers like llvmpipe
doesn't support the uploading of constants from user buffers, so improve
the path to work for all drivers

Inspired from the gl state tracker.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Drop one path to upload constants

Drop the path to upload constants that was using a resource.
Use only the user_buffer one.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Fix constant buffer reinitialisation

The size used for the memset was incorrect.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: restrict to 256 constants for vs shaders.

This is wine behaviour and apparently the behaviour of dx9 drivers
for dx1x hw.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Drop unused code to handle more constants

We handle maximum 256 float constants, like wine and most dx9 drivers.
It is not possible to get more constants

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Change the calculation of the constant buffer size.

Count separately the number of float, int and bool constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Remove useless optimisations to avoid constant uploads

Previous removed path to upload constants was trying to do as
few uploads as possible.
The path kept doesn't benefit these optimisations, thus remove them.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: fix the size of the constant buffer with relative addressing

When relative addressing is on, we have to copy the constants defined in the
shader in the constant file.
The size for the new constant buffer was incorrectly calculated.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Add new texture format strings

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: return D3DERR_INVALIDCALL when trying to create a texture of bad format

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: add missing c++ declaration for IDirect3DVolumeTexture9
st/nine: add a couple of missing #defines.
st/nine: add support for BC4 / D3DFMT_ATI1N  and BC5 / D3DFMT_ATI2N  compression formats.
         and add some additional fourcc declarations.
st/nine: error message more specific.