skia2/tests/sksl/inliner/InlineWithNestedCalls.glsl
John Stiles 7bd7ea2c8e Prevent no-op statements in GLSL code generator.
This eliminates a handful of useless statements. They were harmless, but
presumably this saves optimization work for the GLSL compiler.

(Patterned after http://review.skia.org/496377 )

Change-Id: Ibe135750488a9917b982dcac67f22b3765412ee1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496599
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-01-19 17:36:54 +00:00

45 lines
568 B
GLSL

out vec4 sk_FragColor;
void main() {
float z = 0.0;
float _2_y = z;
float _3_x = _2_y;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
++_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
--_3_x;
_3_x = 42.0;
_2_y = _3_x;
sk_FragColor.x = z;
}