skia2/resources/sksl/inliner
John Stiles 92d83b7b9d Add test to demonstrate out-param semantics violation.
GLSL ES2 documentation on out parameters: "Evaluation of an out
parameter results in an l-value that is used to copy out a value when
the function returns."

The inliner does not do any alias checking when inlining an `out` param.
That is, passing the same variable to two separate `out` parameters
would not generate two distinct lvalues in the inlined code; it reuses
the same variable for each out-params in the inlined code.

(Amusingly, our CFG can fully optimize away this test code so it just
returns "red".)

Change-Id: Ib781d2cfdac54f01b6abe159af0c84ff24ff6976
Bug: skia:11326
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370256
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-16 14:28:49 +00:00
..
DoWhileBodyMustBeInlinedIntoAScope.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
DoWhileTestCannotBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
EnumsCanBeInlinedSafely.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ExponentialGrowth.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForBodyMustBeInlinedIntoAScope.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForInitializerExpressionsCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForWithoutReturnInsideCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForWithReturnInsideCannotBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfBodyMustBeInlinedIntoAScope.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfElseBodyMustBeInlinedIntoAScope.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfElseChainWithReturnsCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfTestCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfWithReturnsCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineKeywordOverridesThreshold.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerAvoidsVariableNameOverlap.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerCanBeDisabled.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerElidesTempVarForReturnsInsideBlock.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerHonorsGLSLOutParamSemantics.sksl Add test to demonstrate out-param semantics violation. 2021-02-16 14:28:49 +00:00
InlinerManglesNames.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerUsesTempVarForMultipleReturns.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerUsesTempVarForReturnsInsideBlockWithVar.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerWrapsEarlyReturnsWithForLoop.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerWrapsSwitchWithReturnInsideWithForLoop.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineThreshold.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithInoutArgument.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithModifiedArgument.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithNestedBigCalls.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithNestedCalls.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithUnmodifiedArgument.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithUnnecessaryBlocks.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ShortCircuitEvaluationsCannotInlineRightHandSide.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
StructsCanBeInlinedSafely.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwitchWithCastCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwitchWithoutReturnInsideCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwizzleCanBeInlinedDirectly.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
TernaryResultsCannotBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
TernaryTestCanBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
TrivialArgumentsInlineDirectly.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
WhileBodyMustBeInlinedIntoAScope.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
WhileTestCannotBeInlined.sksl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00