Emit simpler WGSL for-loops when the loop-count is known.
When we have determined that a for-loop has a fixed number of
iterations, we can move its termination check into the
`continuing` block. This saves one comparison, and also makes
the code read slightly more like idiomatic/user-authored WGSL.
Change-Id: I941c8b8eb3389af532611c0eac08a415c5cb5289
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/708798
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
17 files changed