skia2/resources/sksl/shared/Hex.sksl
John Stiles abb6814cc7 Add support for 0XABCD style hex literals.
To my great surprise, a capital X is allowed in hex literals. In fact,
this is allowed in both GLSL and C. The ES2 conformance suite tests
this, so now SkSL supports it as well.

Change-Id: If795c6033b301420669f002530ee1d14fec29f96
Bug: skia:12533
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458723
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-13 12:41:54 +00:00

16 lines
233 B
Plaintext

uniform half4 colorGreen;
half4 main(float2 coords) {
int i1 = 0x0;
i1++;
int i2 = 0x1234;
i2++;
int i3 = 0X7ffe;
i3++;
int i4 = -0x7ffe;
i4++;
int i5 = 0X4abc;
i5++;
return colorGreen;
}