Fix ordering of trace-exit and load-return-mask ops.

Previously, we would emit a trace-exit op before restoring the
return mask to the parent's value. This meant that trace-exit ops
would not be present in the trace output, since the execution mask
was off when `trace_exit` was encountered.

In practice, this didn't affect all cases because we do not use
the return mask in sufficiently simple functions, but it would
cause tests like Mandelbrot to generate broken traces.
(https://shaders.skia.org/?id=7cd08fc6b1b23121529c62e31e00b4bd6b49deba9a3904fd01fda3dc5c590050

Change-Id: Ic0a28e2f844245f98addd65ca331b9ef8892eeb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/663916
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
6 files changed