skia2/tests/sksl
John Stiles 0777ac4778 Optimize swizzled multiple-argument constructors.
This will reorder constructors with swizzles applied, such as
    `half4(1, 2, 3, 4).xxyz` --> `half4(1, 1, 2, 3)`
    `half4(1, colRGB).yzwx` --> `half4(colRGB.x, colRGB.y, colRGB.z, 1)`

Note that, depending on the swizzle components, some elements of the
constructor may be duplicated and others may be eliminated. The
optimizer makes sure to leave the swizzle alone if it would duplicate
anything non-trivial, or if it would eliminate anything with a side
effect.

Change-Id: I470fda217ae8cf5828406b89a5696ca6aebf608d
Bug: skia:10954
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335860
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-19 17:10:11 +00:00
..
blend Directly compute call counts, rather than mutating state 2020-10-19 16:08:39 +00:00
errors Disallow unsized array dimensions on size fields past the frontmost. 2020-11-17 16:44:13 +00:00
fp Fix bad FP codegen when sample() calls are inlined. 2020-11-03 19:54:45 +00:00
glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
inliner Optimize swizzled multiple-argument constructors. 2020-11-19 17:10:11 +00:00
metal Disallow opaque types in structs and interface blocks. 2020-11-17 15:25:43 +00:00
shared Optimize swizzled multiple-argument constructors. 2020-11-19 17:10:11 +00:00
workarounds Directly compute call counts, rather than mutating state 2020-10-19 16:08:39 +00:00