On Mon, 2016-01-11 at 09:36 -0800, Matt Turner wrote: > 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 > --- > src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp > b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp > index 9141907..95d4504 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp > @@ -300,7 +300,7 @@ 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) || fabsf(reg->f) == table.imm[i].val);
Shouldn't this be: (isnan(reg->f) && isnan(table.imm[i].val)) || fabsf(reg->f) == table.imm[i].val) Iago > } > } > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev