From 12b67964078f7cc1d7e9bdf76c899c059608d317 Mon Sep 17 00:00:00 2001 From: John Stiles Date: Tue, 8 Feb 2022 14:36:36 -0500 Subject: [PATCH] Fix floating-point overflow error check on OS X 10.12. We no longer enforce a particular string form of 3.41e+38. Change-Id: I33b8a30aa3c7ab54de0c7f4a02181b60cd8f71a3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505799 Commit-Queue: John Stiles Auto-Submit: John Stiles Reviewed-by: Robert Phillips Commit-Queue: Robert Phillips --- resources/sksl/errors/OverflowFloatLiteral.sksl | 5 ++--- tests/sksl/errors/OverflowFloatLiteral.glsl | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/sksl/errors/OverflowFloatLiteral.sksl b/resources/sksl/errors/OverflowFloatLiteral.sksl index 0e9f93e305..3015135ffa 100644 --- a/resources/sksl/errors/OverflowFloatLiteral.sksl +++ b/resources/sksl/errors/OverflowFloatLiteral.sksl @@ -1,8 +1,7 @@ void main() { - sk_FragColor.x = half4(3.41e+38); + sk_FragColor = half4(3.41e+38); } /*%%* -floating-point value is too large: 3.41e+38 -type mismatch: '=' cannot operate on 'half', 'half4' +floating-point value is too large: *%%*/ diff --git a/tests/sksl/errors/OverflowFloatLiteral.glsl b/tests/sksl/errors/OverflowFloatLiteral.glsl index 00523fd608..cb52faeda7 100644 --- a/tests/sksl/errors/OverflowFloatLiteral.glsl +++ b/tests/sksl/errors/OverflowFloatLiteral.glsl @@ -1,5 +1,4 @@ ### Compilation failed: error: 2: floating-point value is too large: 3.41e+38 -error: 2: type mismatch: '=' cannot operate on 'half', 'half4' -2 errors +1 error