i965/fs: Skip assertion on NaN.

A shader in Unreal4 uses the result of divide by zero in its color
output, producing NaN and triggering this assertion since NaN is not
equal to itself.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93560
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
Matt Turner 2016-01-11 09:34:50 -08:00
parent 64800933b8
commit 7dc2e5f940

View file

@ -300,7 +300,8 @@ fs_visitor::opt_combine_constants()
reg->subreg_offset = table.imm[i].subreg_offset;
reg->stride = 0;
reg->negate = signbit(reg->f) != signbit(table.imm[i].val);
assert(fabsf(reg->f) == table.imm[i].val);
assert((isnan(reg->f) && isnan(table.imm[i].val)) ||
fabsf(reg->f) == table.imm[i].val);
}
}