skia2/tests/sksl/inliner/IfElseBodyMustBeInlinedIntoAScope.glsl

11 lines
170 B
Plaintext
Raw Normal View History

out vec4 sk_FragColor;
uniform vec4 color;
void main() {
vec4 c = color;
# Enter a description of the change. Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit 7e685f0377b161637f5e091e3f7320197f000a70. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commit e4da7b672f4012cbbad92c32a2810df8ab28af9e. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 21:13:45 +00:00
if (c.x >= 0.5) ; else {
c = color + vec4(0.125);
}
sk_FragColor = c;
}