mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
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>
This commit is contained in:
committed by
Commit Bot service account
parent
e896a0da66
commit
2d8ba5fac6
@@ -109,6 +109,10 @@ uint16_t Float32ToFloat16(float fp32) {
|
||||
}
|
||||
}
|
||||
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user