commit | caac741c10c1ed125bce19ef6429fa22cf099cb0 | [log] [tgz] |
---|---|---|
author | C Stout <cstout@google.com> | Thu Jan 12 20:48:46 2023 -0800 |
committer | Craig Stout <cstout@google.com> | Fri Jan 13 20:05:14 2023 +0000 |
tree | dfb679aedae1b045e0b36eec5a738d93547294cd | |
parent | de6984a29b0a2a462f9fe1259c15b2ff86fc6336 [diff] |
[framework] Fix precision checking problems due to compiler optimization This fixes some test failures on Intel GPUs. Bug:119516 Change-Id: Ie0abb8d0ab8c53d1112869b8170ec995a0d57b4d Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/vulkan-cts/+/789406 Reviewed-by: John Bauman <jbauman@google.com>
diff --git a/framework/common/tcuInterval.hpp b/framework/common/tcuInterval.hpp index f5cf640..f7e1619 100644 --- a/framework/common/tcuInterval.hpp +++ b/framework/common/tcuInterval.hpp
@@ -31,6 +31,11 @@ #include <limits> #include <cmath> +// Prevents an issue with instruction re-ordering around the calls to +// set rounding mode in TCU_SET_INTERVAL_BOUNDS. +// TODO(fxbug.dev/119516) replace with upstream solution. +#pragma STDC FENV_ACCESS ON + #define TCU_INFINITY (::std::numeric_limits<float>::infinity()) #define TCU_NAN (::std::numeric_limits<float>::quiet_NaN())