Commit f165f0b4 by Shao Committed by Commit Bot

Tighten the workarounds on isnan for Intel drivers

This driver bug has been fixed in 21.20.16.4542. BUG=chromium:650547 Change-Id: I2a5c7c01bf48d854bd6c4c6a380e57617e00529a Reviewed-on: https://chromium-review.googlesource.com/422992 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 0448ec84
......@@ -91,8 +91,9 @@ struct WorkaroundsD3D
bool rewriteUnaryMinusOperator = false;
// On some Intel drivers, using isnan() on highp float will get wrong answer. To work around
// this bug, we use an expression to emulate function isnan(). Tracking bug:
// https://crbug.com/650547
// this bug, we use an expression to emulate function isnan().
// Tracking bug: https://crbug.com/650547
// This driver bug is fixed in 21.20.16.4542.
bool emulateIsnanFloat = false;
// On some Intel drivers, using clear() may not take effect. One of such situation is to clear
......
......@@ -1858,8 +1858,21 @@ angle::WorkaroundsD3D GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps
workarounds.rewriteUnaryMinusOperator =
IsIntel(adapterDesc.VendorId) &&
(IsBroadwell(adapterDesc.DeviceId) || IsHaswell(adapterDesc.DeviceId));
workarounds.emulateIsnanFloat =
IsIntel(adapterDesc.VendorId) && IsSkylake(adapterDesc.DeviceId);
if (IsIntel(adapterDesc.VendorId) && IsSkylake(adapterDesc.DeviceId))
{
if (deviceCaps.driverVersion.valid())
{
WORD part1 = HIWORD(deviceCaps.driverVersion.value().LowPart);
WORD part2 = LOWORD(deviceCaps.driverVersion.value().LowPart);
// Disable the workaround on the new fixed driver.
workarounds.emulateIsnanFloat = part1 <= 16u && part2 < 4542u;
}
else
{
workarounds.emulateIsnanFloat = true;
}
}
workarounds.callClearTwiceOnSmallTarget =
IsIntel(adapterDesc.VendorId) && IsSkylake(adapterDesc.DeviceId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment