st/nine: Handle RSQ special cases

We should use the absolute value of the input
as input to ureg_RSQ.
An input of 0.0 should return FLT_MAX. To support that
efficiently cap the output of RSQ.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Handle NRM with input of null norm

When the input's xyz are 0.0, the output
should be 0.0. This is due to the fact that
Inf * 0 = 0 for dx9. To handle this case,
cap the result of RSQ to FLT_MAX. We have
FLT_MAX * 0 = 0.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Correct LOG on negative values

LOG, like POW, is applicated on the absolute value of the input.

Also return -FLT_MAX instead of -Inf for an input of 0.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Remove duplicated code for ps texcoord input declaration

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Implement TEXCOORD special behaviours

texcoord for ps < 1_4 should clamp between 0 and 1 the values.

texcrd (texcoord ps 1_4) does not clamp and can be used with
two modifiers _dw and _dz that means the channels are divided
by w or z.
Implement those in shared code, since the same modifiers can be used
for texld ps 1_4.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Implement ps3 advanced input definition feature

ps3 allows definitions of the inputs like:
DCL_TEXCOORD0 v0.xy;
DCL_NORMAL2 v0.z;
DCL_NORMAL3 v0.w;

Nine wouldn't have handled this situation properly.

Apparently very few applications use this feature.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
st/nine: Check if srgb format is supported before trying to use it.

According to msdn, we must act as if user didn't ask srgb if we don't
support it.

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