skia2/tests/sksl
John Stiles f5c1d04ab2 Flatten out constructors nested inside constructors.
- float4(float2(1, 2), 3, 4)   -->  float4(1, 2, 3, 4)
- half3(z, half2(fn(x), y*2))  -->  half3(z, fn(x), y*2)

Single-argument constructors will be ignored by this optimization; these
might be casts or splats.

This had an unexpected side benefit of simplifying some Metal output,
as we need to output fewer Metal matrix construction helper functions
when matrices use more simple scalars for construction.

Change-Id: I0a161db060c107e35247901619291bf83801cb11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337400
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-23 21:29:53 +00:00
..
blend Revert "Simplify _blend_set_color_saturation, removing an instruction." 2020-11-23 17:16:13 +00:00
errors Fix double-negation of constant-value construcors. 2020-11-23 17:02:21 +00:00
fp Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
inliner Revert "Simplify _blend_set_color_saturation, removing an instruction." 2020-11-23 17:16:13 +00:00
metal Flatten out constructors nested inside constructors. 2020-11-23 21:29:53 +00:00
shared Flatten out constructors nested inside constructors. 2020-11-23 21:29:53 +00:00
workarounds Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00