From 172cd1e8dfd535c6d387176eceb83bea3a75027d Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 29 Sep 2020 09:47:26 +0000 Subject: [PATCH] TextureFormatTests: Test more Snorm format corner cases. Bug: None Change-Id: I02cba96f64d62495e21ba04bb514de9fb1563507 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29060 Reviewed-by: Austin Eng Reviewed-by: Jiawei Shao Commit-Queue: Corentin Wallez --- src/tests/end2end/TextureFormatTests.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/end2end/TextureFormatTests.cpp b/src/tests/end2end/TextureFormatTests.cpp index fbd0941ca7..f75ab6323a 100644 --- a/src/tests/end2end/TextureFormatTests.cpp +++ b/src/tests/end2end/TextureFormatTests.cpp @@ -365,8 +365,9 @@ class TextureFormatTest : public DawnTest { T maxValue = std::numeric_limits::max(); T minValue = std::numeric_limits::min(); - std::vector textureData = {0, 1, maxValue, minValue}; - std::vector uncompressedData = {0.0f, 1.0f / maxValue, 1.0f, -1.0f}; + std::vector textureData = {0, 1, -1, maxValue, minValue, T(minValue + 1), 0, 0}; + std::vector uncompressedData = { + 0.0f, 1.0f / maxValue, -1.0f / maxValue, 1.0f, -1.0f, -1.0f, 0.0f, 0.0f}; DoFloatFormatSamplingTest(formatInfo, textureData, uncompressedData, 0.0001f / maxValue); // Snorm formats aren't renderable because they are not guaranteed renderable in Vulkan