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 <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2020-09-29 09:47:26 +00:00 committed by Commit Bot service account
parent b2a4e87ad2
commit 172cd1e8df
1 changed files with 3 additions and 2 deletions

View File

@ -365,8 +365,9 @@ class TextureFormatTest : public DawnTest {
T maxValue = std::numeric_limits<T>::max();
T minValue = std::numeric_limits<T>::min();
std::vector<T> textureData = {0, 1, maxValue, minValue};
std::vector<float> uncompressedData = {0.0f, 1.0f / maxValue, 1.0f, -1.0f};
std::vector<T> textureData = {0, 1, -1, maxValue, minValue, T(minValue + 1), 0, 0};
std::vector<float> 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