commit | af4eded5bec73327770d7178c95b74232325ae46 | [log] [tgz] |
---|---|---|
author | John Stiles <johnstiles@google.com> | Thu Mar 16 17:14:09 2023 -0400 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Fri Mar 17 19:08:37 2023 +0000 |
tree | 9f2fae6960c6629b11a078b793ab203fde40fb8b | |
parent | ebd7365d5ae0d16170649d4cdfed5e75e9b0117b [diff] |
Implement normalize intrinsic in RP codegen. We implement normalize as `x / length(x)`, which matches the SkVM implementation. A zero-length vector will return nan; the GLSL docs don't specify what should happen in this case: http://screen/3TsNoijNDxN5xQZ Change-Id: I4c57e54fdbc0d986bb8d1adb52ec0889f9d9846b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/657816 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: John Stiles <johnstiles@google.com>