skia2/include/private
John Stiles 33fb008669 Add parser support for u suffix on literals.
Because SkSL is much more permissive than GLSL about literal types, we
don't actually need to treat values any differently when the `u` suffix
is added. That is, `uint x = 4000000000;` already worked fine. When we
encounter the `u`, we just ignore it. This also means that a literal
like `-100u` would be accepted without complaint (although you'd get a
range error if you tried `uint x = -100u;`).

The value-add here is that it removes a speed bump when porting GLSL
code to SkSL. The Filament example shader used the `u` suffix anywhere
that bitwise ops were present; finding and removing all of them was a
chore.

Also of note: the `u` suffix was only added to GLSL in ES3, but we
"support" it everywhere. (We could go out of our way to detect it in
ES2 and flag an error, but that benefits no one.)

Change-Id: I4bf643612c8cf17710e9bad50a0c16f5936bbe88
Bug: skia:12634
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471756
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-11-16 13:50:14 +00:00
..
BUILD.bazel [infra] Add Bazel rules for codecs. 2021-11-11 20:10:01 +00:00
GrContext_Base.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
GrD3DTypesMinimal.h Reland "Add new GrSurfaceInfo class and related backend structs." 2021-09-20 20:44:53 +00:00
GrDawnTypesPriv.h Reland "Add new GrSurfaceInfo class and related backend structs." 2021-09-20 20:44:53 +00:00
GrGLTypesPriv.h Reland "Add new GrSurfaceInfo class and related backend structs." 2021-09-20 20:44:53 +00:00
GrImageContext.h Change PromiseImage API to take GrContextThreadSafeProxy 2021-02-19 21:52:59 +00:00
GrMockTypesPriv.h Reland "Add new GrSurfaceInfo class and related backend structs." 2021-09-20 20:44:53 +00:00
GrMtlTypesPriv.h Reland "Add new GrSurfaceInfo class and related backend structs." 2021-09-20 20:44:53 +00:00
GrResourceKey.h Reland "Add format-specifier warnings to SkDebugf." 2021-06-25 17:57:43 +00:00
GrSingleOwner.h Remove ableist language 2021-06-16 21:37:21 +00:00
GrTypesPriv.h Rename Uint to UInt. 2021-11-02 15:05:52 +00:00
GrVkTypesPriv.h Reland "Add new GrSurfaceInfo class and related backend structs." 2021-09-20 20:44:53 +00:00
OWNERS Reland "Add OWNERS to include (and include/private) to enforce API review" 2021-09-27 18:20:19 +00:00
SkBitmaskEnum.h Fix modifier key handling in OS X to allow command-keys to work. 2020-07-01 16:07:03 +00:00
SkChecksum.h Revert "Revert "gms for SkParagraph"" 2020-06-02 19:26:04 +00:00
SkColorData.h Fix implicit signedness change warnings in private includes 2021-05-13 17:10:44 +00:00
SkDeque.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkEncodedInfo.h Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
SkFixed.h move SkTPin to include/private 2020-10-16 19:45:11 +00:00
SkFloatBits.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFloatingPoint.h Remove unreferenced TODO function. 2021-06-16 18:45:18 +00:00
SkHalf.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkIDChangeListener.h Remove bug-prone SkIDChangeListener singleThreaded arg 2021-02-26 17:05:53 +00:00
SkImageInfoPriv.h Reland "Add sRGB 8888 colortype" 2021-08-24 12:56:32 +00:00
SkMacros.h Move GR_MAKE_BITFIELD_OPS and GrAlignTo to non-GPU files 2021-11-01 17:26:59 +00:00
SkMalloc.h [fuzz] Standardize, document, and backport fuzzing defines. 2020-09-14 13:36:10 +00:00
SkMutex.h mark SkAutoMutexExclusive unmovable 2021-02-28 16:12:25 +00:00
SkNoncopyable.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkNx_neon.h remove SkNx::rsqrt() 2021-04-14 20:54:08 +00:00
SkNx_sse.h Fix implicit signedness change warnings in private includes 2021-05-13 17:10:44 +00:00
SkNx.h remove SkNx::rsqrt() 2021-04-14 20:54:08 +00:00
SkOnce.h experimental support for go/fibers 2019-10-28 16:48:55 +00:00
SkOpts_spi.h Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
SkPathRef.h Assert that SkPath is always internally consistent 2020-12-09 23:56:17 +00:00
SkSafe32.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSafe_math.h Guard against buggy ucrt\math.h. 2016-11-28 15:40:23 +00:00
SkSemaphore.h Reland "Cache hb_face." 2020-05-19 17:42:14 +00:00
SkShadowFlags.h Add support for directional lights. 2020-12-16 16:58:26 +00:00
SkSLDefines.h Enforce basic limits on function stack size in SkSL. 2021-11-04 18:17:44 +00:00
SkSLIRNode.h Remove ASTNode and SkSLParser 2021-09-28 13:36:49 +00:00
SkSLLayout.h Remove (unused) geometry shader support 2021-08-27 19:41:10 +00:00
SkSLModifiers.h Moved CheckModifiers out of IRGenerator 2021-10-14 14:30:01 +00:00
SkSLProgramElement.h Remove enum support from SkSL 2021-07-09 14:03:15 +00:00
SkSLProgramKind.h Remove (unused) geometry shader support 2021-08-27 19:41:10 +00:00
SkSLSampleUsage.h Use varyings to implement MatrixEffects applied to DeviceCoord FPs. 2021-08-02 19:39:13 +00:00
SkSLStatement.h Reland "Renamed SkSL "offset" to "line"" 2021-09-27 19:52:08 +00:00
SkSLString.h Add parser support for u suffix on literals. 2021-11-16 13:50:14 +00:00
SkSLSymbol.h Removed StringFragment alias in favor of skstd::string_view 2021-06-10 18:07:03 +00:00
SkSpinlock.h Add thread safety annotations. 2019-05-10 13:40:38 +00:00
SkTArray.h Avoid over-allocation in SkTArray assignment and reserve_back. 2020-11-11 17:09:15 +00:00
SkTDArray.h Add explicit int -> size_t casts to SkTDArray.h 2020-12-28 17:23:49 +00:00
SkTemplates.h Chop tessellated curves that don't fit in a patch 2021-05-21 23:01:43 +00:00
SkTFitsIn.h Add support for MSVC run-time checks (and control flow guard) 2019-02-04 20:55:24 +00:00
SkTHash.h SkTHashTable to not require default constructable T 2021-11-04 21:44:46 +00:00
SkThreadAnnotations.h Add a condition to prevent a thread annotation meant for blaze from showing up to emscripten 2020-02-28 17:57:20 +00:00
SkThreadID.h Mark SkGetThreadID SK_SPI in debug. 2020-07-07 21:50:55 +00:00
SkTLogic.h Align SkSpan API with std::span 2021-05-10 17:41:52 +00:00
SkTo.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTOptional.h Add skstd::optional::emplace. 2021-08-26 19:03:29 +00:00
SkTPin.h switch SkTPin impl to pin NaN to lo 2020-10-16 21:08:51 +00:00
SkVx.h Reland "add a scaled uint32x4_t divided by uint32_t to SkVx" 2021-10-12 20:02:01 +00:00
SkWeakRefCnt.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00