skia2/tests/sksl/inliner/golden
John Stiles dc75a97b80 Add global struct definitions to SkSL.
Previously, GLSL and Metal code generators would emit a struct wherever
the type was first used in the code, regardless of where it was
originally defined or what scope the type needs to live in. This CL adds
a ProgramElement for struct definitions, so that structs will now appear
at the top-level as they were originally defined. In the case of Metal,
some special handling is also needed to handle the Globals struct
properly.

Not yet fully supported:
- No special handling for structs declared inside functions yet
- No support for structs in separate scopes with overlapping names
The severity of the remaining issues depends mostly on whether we want
to support structs inside functions in Runtime Effects.

Change-Id: Ia95d4529506cb3fa6da63f5cb548199a93e1c0c5
Bug: skia:10922, skia:10923, skia:10925, skia:10926
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338600
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-30 15:26:14 +00:00
..
DoWhileBodyMustBeInlinedIntoAScope.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
DoWhileTestCannotBeInlined.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00
ExponentialGrowth.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
ExponentialGrowthStandaloneSettings.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
ForBodyMustBeInlinedIntoAScope.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
ForInitializerExpressionsCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
ForWithoutReturnInsideCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
ForWithReturnInsideCannotBeInlined.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00
IfBodyMustBeInlinedIntoAScope.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
IfElseBodyMustBeInlinedIntoAScope.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
IfElseChainWithReturnsCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
IfTestCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
IfWithReturnsCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlineKeywordOverridesThreshold.glsl Factor out Inliner candidate list assembly into its own function. 2020-10-02 20:39:24 +00:00
InlinerAvoidsVariableNameOverlap.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlinerCanBeDisabled.glsl Reland "Simplify _blend_set_color_saturation, removing an instruction." 2020-11-24 15:35:05 +00:00
InlinerCanBeDisabledStandaloneSettings.glsl Reland "Simplify _blend_set_color_saturation, removing an instruction." 2020-11-24 15:35:05 +00:00
InlinerManglesNames.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlinerWrapsEarlyReturnsWithDoWhileBlock.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlinerWrapsEarlyReturnsWithDoWhileBlockStandaloneSettings.glsl Rename 'DefaultSettings' golden outputs to 'StandaloneSettings'. 2020-09-21 22:15:51 +00:00
InlineThreshold.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00
InlineWithInoutArgument.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlineWithModifiedArgument.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlineWithNestedBigCalls.glsl Factor out Inliner candidate list assembly into its own function. 2020-10-02 20:39:24 +00:00
InlineWithNestedCalls.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
InlineWithUnmodifiedArgument.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00
InlineWithUnnecessaryBlocks.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
ShortCircuitEvaluationsCannotInlineRightHandSide.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
SwitchWithCastCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
SwitchWithoutReturnInsideCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
SwitchWithReturnInsideCannotBeInlined.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00
SwizzleCanBeInlinedDirectly.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
TernaryResultsCannotBeInlined.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00
TernaryTestCanBeInlined.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
TrivialArgumentsInlineDirectly.glsl Add global struct definitions to SkSL. 2020-11-30 15:26:14 +00:00
WhileBodyMustBeInlinedIntoAScope.glsl Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
WhileTestCannotBeInlined.glsl Align default values of GrShaderCaps with StandaloneShaderCaps. 2020-09-16 15:16:37 +00:00