diff options
author | Matt Turner <[email protected]> | 2016-01-11 09:34:50 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-01-13 10:32:53 -0800 |
commit | 7dc2e5f94024746ab2e39f77ab778fe3b89c0eb1 (patch) | |
tree | 8fde5bd135b8befdc097450f7429df9d18a58620 /src/mesa | |
parent | 64800933b80ac8f4ff44adfc2c8f5f41ff32270b (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 9141907718c..994c699bb5a 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,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); } } |