ecd2036eae
- CastsRoundTowardZero - Functions - GeometricIntrinsics - HelloWorld - Hex Other test updates: - DeadLoopVariable (for-loop structure incompatible with ES2) - FunctionPrototype (RTE currently disallows calling undef'd functions) - HexUnsigned (unsigned types incompatible with ES2) Change-Id: I794bee24dfac55281c9b8b130529888ba2546290 Bug: skia:11009 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364678 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
19 lines
320 B
GLSL
19 lines
320 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
uniform vec4 colorGreen;
|
|
uniform vec4 colorRed;
|
|
float foo(vec2 v) {
|
|
return v.x * v.y;
|
|
}
|
|
void bar(inout float x) {
|
|
float y[2];
|
|
y[0] = x;
|
|
y[1] = x * 2.0;
|
|
x = foo(vec2(y[0], y[1]));
|
|
}
|
|
vec4 main() {
|
|
float x = 10.0;
|
|
bar(x);
|
|
return x == 200.0 ? colorGreen : colorRed;
|
|
}
|