skia2/tests/sksl/inliner/golden/TrivialArgumentsInlineDirectly.glsl
John Stiles d059005b93 Avoid creating unnecessary scopes during inlining.
The additional scopes were harmless, but didn't really add any value.
Originally they were used to tightly scope inlined variables, but we now
mangle inlined variable names.

Change-Id: I7b35e737598036c0b6d3d9f71cbcd4a53d609ce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344757
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-12-15 21:11:45 +00:00

71 lines
988 B
GLSL

out vec4 sk_FragColor;
in float val;
uniform int ui;
uniform vec4 uh4;
struct S {
vec4[1] ah4;
float[1] ah;
vec4 h4;
float h;
};
void main() {
S s;
s.ah4[0] = vec4(val);
s.ah[0] = val;
s.h4 = vec4(val);
s.h = val;
S as[1];
as[0].ah4[0] = vec4(val);
sk_FragColor = sk_FragColor.xxxx;
sk_FragColor = vec4(s.h);
sk_FragColor = s.ah4[0].ywyw;
sk_FragColor = as[0].ah4[0].xyxy;
sk_FragColor = s.h4.zzzz;
sk_FragColor = uh4.xyzx;
sk_FragColor = vec4(s.h);
sk_FragColor = vec4(s.h);
sk_FragColor = s.ah4[0].xxxy;
sk_FragColor = uh4;
bool _0_b = !true;
sk_FragColor = _0_b ? sk_FragColor.xxxx : sk_FragColor.yyyy;
float _1_h = -s.h;
sk_FragColor = vec4(_1_h);
vec2 _2_h2 = s.ah4[ui].yw;
sk_FragColor = _2_h2.xyxy;
vec3 _3_h3 = s.h4.yyy + s.h4.zzz;
sk_FragColor = _3_h3.xyzx;
vec4 _4_h4 = vec4(s.h4.y, 0.0, 0.0, 1.0);
sk_FragColor = _4_h4;
}