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>
12 lines
291 B
Plaintext
12 lines
291 B
Plaintext
inline int tooBig(int x) {
|
|
++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x;
|
|
++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x;
|
|
return x;
|
|
}
|
|
|
|
void main() {
|
|
int y = 0;
|
|
y = tooBig(y);
|
|
y = tooBig(y);
|
|
}
|