allow early returns

For posterity, here's my initial, wrong thinking:

    If we squint at "return foo" and read it as "result = foo; goto
    end_of_program", and then remember we can always skip forward jumps (and
    where's further forward than end of program?), early returns turn out to
    work just like a store.

The reason this is wrong is that by the time we reach a final return,
the entire mask stack has been popped back down to its original default
ffffffff (active) state.  But that return shouldn't override any prior
returns.  So that scheme isn't quite right.

Instead we accumulate the result by disabling updates to lanes that have
already returned.  By the time we're done, all lanes should have hit
_some_ active return, now asserted.

Bug: skia:10852
Change-Id: I27b05f04a60ff4a5f2fe5f59bf398c3f7224a41b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327457
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
4 files changed