Add rendering tests for all color formats

BUG=dawn:128

Change-Id: I32cab39e77847388a7736a51532a1b5c24a0fde7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8684
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/common/Math.cpp b/src/common/Math.cpp
index a096bea..4077bdb 100644
--- a/src/common/Math.cpp
+++ b/src/common/Math.cpp
@@ -109,6 +109,10 @@
     }
 }
 
+bool IsFloat16NaN(uint16_t fp16) {
+    return (fp16 & 0x7FFF) > 0x7C00;
+}
+
 // Based on the Khronos Data Format Specification 1.2 Section 13.3 sRGB transfer functions
 float SRGBToLinear(float srgb) {
     // sRGB is always used in unsigned normalized formats so clamp to [0.0, 1.0]