Track the state of the execution mask in Builder.
When programs have straight-line control flow--no ifs, no early
returns, no breaks, no continues, no switches, etc--we can emit
simpler code. The Builder now has a mechanism called
`enableExecutionMaskWrites` which gates all usage of execution-
mask related ops. It is the caller's responsibility to ensure
that the execution mask is returned to its prior state before
execution-mask writes are disabled; the Builder isn't able to
verify this automatically.
At present, this CL doesn't change anything about codegen when
this flag is set, but it sets the flag in all appropriate places,
and enforces that execution-mask ops are not used unless
`enableExecutionMaskWrites` has occurred first. In followup
CLs, the Builder will be able to generate simpler code when we
know that the execution mask is in its default (all-on) state.
Change-Id: I5065e471cc3c97e281e0082def77d8a7c2c873f2
Bug: skia:13676
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/632358
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
4 files changed