830c69ca66
GLSL/SkSL assumes that == and != on struct/array types should work. We need to emit equality and inequality operators whenever we find code that compares a struct or array. Structs and arrays can be arbitrarily nested, and either type can contain a matrix. All of these things need custom equality operators in Metal. Therefore, we need to recursively generate comparison operators when any of these types are encountered. For arrays we get lucky, and we can cover all possible array types and sizes with a single templated operator== method. Structs and matrices have no such luck, and are generated separately on a per-type basis. For each of these types, operator== is implemented as an equality check on each field, and operator!= is implemented in terms of operator==. Equality and inequality are always emitted together. (Previously, matrix equality and inequality were emitted and implemented independently, but this is no longer the case.) Change-Id: I69ee01c0a390d7db6bcb2253ed6336ab20cc4d1d Bug: skia:11908, skia:11924 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402016 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> |
||
---|---|---|
.. | ||
blend | ||
dslfp | ||
errors | ||
folding | ||
fp | ||
glsl | ||
inliner | ||
intrinsics | ||
metal | ||
runtime | ||
runtime_errors | ||
shared | ||
spirv | ||
workarounds | ||
README.txt |
This directory contains skslc-compiled output from matching source files in the /resources/sksl/ directory.