skia2/tests/sksl
John Stiles f94348fdd5 Detect and report numeric overflows in the SkSL parser.
Previously, some types of overflow were detected, but most would assert
or silently generate invalid code. Now, the parser will properly report
an error if it encounters any integer that exceeds UINT_MAX or any float
that exceeds FLT_MAX.

This fixes test OverflowUintLiteral.sksl. Added a test for floats as
well, OverflowFloatLiteral.sksl.

OverflowIntLiteral.sksl does not fail yet, because its values are larger
than INT_MAX, not UINT_MAX. These are legal from the perspective of the
parser. This must be caught later at IR generation time.

Change-Id: Ia5a904d01427cdc9f2ab5f4174154418737835e6
Bug: skia:10932
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347176
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-28 16:39:19 +00:00
..
blend Add support for inlining switches with returns inside. 2020-12-18 00:14:48 +00:00
errors Detect and report numeric overflows in the SkSL parser. 2020-12-28 16:39:19 +00:00
fp Make all fragmentProcessors implicitly nullable in SkSL 2020-12-23 20:22:18 +00:00
glsl Replace array indexing on vector types with swizzles. 2020-12-07 21:16:40 +00:00
inliner Elide return expression temp-var in vardecl-less blocks. 2020-12-22 19:33:12 +00:00
intrinsics Implement bitCount intrinsic on SPIR-V and Metal. 2020-12-22 21:46:54 +00:00
metal Enforce additional restrictions on opaque types. 2020-12-22 22:24:24 +00:00
runtime Add .rte -> .skvm unit test framework 2020-12-22 17:59:42 +00:00
shared Fix SPIRV bug constructing a constant vector from another vector 2020-12-23 21:14:48 +00:00
spirv Fix SPIRV bug constructing a constant vector from another vector 2020-12-23 21:14:48 +00:00
workarounds Eliminate inliner temporary variables for top-level-exit functions. 2020-12-17 20:37:21 +00:00