The svga device doesn't handle them. Replace with zeros.
Fixes several piglit tests, such as "glsl-const-builtin-inversesqrt".
Reviewed-by: Reviewed-by: José Fonseca <jfonseca@vmware.com>
unsigned i;
assert(1 <= imm->Immediate.NrTokens && imm->Immediate.NrTokens <= 5);
- for (i = 0; i < imm->Immediate.NrTokens - 1; i++)
- value[i] = imm->u[i].Float;
+ for (i = 0; i < imm->Immediate.NrTokens - 1; i++) {
+ float f = imm->u[i].Float;
+ value[i] = util_is_inf_or_nan(f) ? 0.0f : f;
+ }
for ( ; i < 4; i++ )
value[i] = id[i];