bff24abab8
It is difficult to do this both efficiently and correctly while honoring GLSL semantics (which require the lvalues to be kept distinct, even when they point to the same variable). We could make it work by making copies of every out parameter in each direction (going in for inouts, and coming out for outs and inouts). However, this could be self-defeating if it makes it harder for the driver to track variable lifetimes. Simply opting out of inlining these functions entirely seems like the best tradeoff; let the driver optimize them if it can, and we can enjoy reduced complexity in the SkSL inliner. Change-Id: I62f7b4550cc181cfe789e4f2ff4e408ba1baf9cb Bug: skia:11326 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370257 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
46 lines
578 B
GLSL
46 lines
578 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;
|
|
_2_y;
|
|
sk_FragColor.x = z;
|
|
}
|