Commit 29678a8b authored by Alexis Hetu's avatar Alexis Hetu Committed by Commit Bot

Adding off by one comparators in cc_unittests

SwiftShader's Vulkan library will soon switch from using LLVM as its
backend to Subzero. When using Subzero small off by one errors may
happen, so a few off by one comparators were added in both cases where
this was happening.

Bug: 1060139
Change-Id: Ib3b793f860cb7d76ef8fd1846757e7ae1e483f28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097178Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Alexis Hetu <sugoi@google.com>
Cr-Commit-Position: refs/heads/master@{#748907}
parent ebaf3225
...@@ -452,6 +452,9 @@ TEST_P(LayerTreeHostBlurFiltersPixelTestGPULayerList, ...@@ -452,6 +452,9 @@ TEST_P(LayerTreeHostBlurFiltersPixelTestGPULayerList,
average_error_allowed_in_bad_pixels, average_error_allowed_in_bad_pixels,
large_error_allowed, large_error_allowed,
small_error_allowed)); small_error_allowed));
#else
if (use_vulkan())
pixel_comparator_ = std::make_unique<FuzzyPixelOffByOneComparator>(true);
#endif #endif
RunPixelTestWithLayerList( RunPixelTestWithLayerList(
...@@ -941,6 +944,9 @@ TEST_P(LayerTreeHostFiltersPixelTest, RotatedDropShadowFilter) { ...@@ -941,6 +944,9 @@ TEST_P(LayerTreeHostFiltersPixelTest, RotatedDropShadowFilter) {
percentage_pixels_large_error, percentage_pixels_small_error, percentage_pixels_large_error, percentage_pixels_small_error,
average_error_allowed_in_bad_pixels, large_error_allowed, average_error_allowed_in_bad_pixels, large_error_allowed,
small_error_allowed)); small_error_allowed));
#else
if (use_vulkan())
pixel_comparator_ = std::make_unique<FuzzyPixelOffByOneComparator>(true);
#endif #endif
RunPixelTest( RunPixelTest(
......
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