skia2/tests/sksl/errors/golden/OverflowUintLiteral.glsl
John Stiles 76013704ad Add unit tests for overflowing int and uint literal limits.
At present, we do not report any error; the values wrap silently.

Change-Id: I8c435cfdd81f6c2e5fd87e9c39c708138bf4ec82
Bug: skia:10932
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333676
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-11-11 16:11:15 +00:00

13 lines
312 B
GLSL

out vec4 sk_FragColor;
uint uintMin = 0u;
uint uintMinMinusOne = 4294967295u;
uint uintMax = 4294967295u;
uint uintMaxPlusOne = 0u;
void main() {
sk_FragColor.x = float(uintMin);
sk_FragColor.x = float(uintMinMinusOne);
sk_FragColor.x = float(uintMax);
sk_FragColor.x = float(uintMaxPlusOne);
}