skia2/tests/sksl/inliner
John Stiles 4d6310ab20 Support half4 return values from main() in the SPIR-V code generator.
This creates a helper function, _entrypoint, which invokes main() and
assigns its result into sk_FragColor. We also make sure to prevent
sk_FragColor from being dead-stripped from the code during IR
generation.

At present this is useful for allowing our SkSL test shaders to compile.

Change-Id: I2d7fab0e1959a77778ffdb18ca569e869bcaeece
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358525
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-27 02:46:03 +00:00
..
DoWhileBodyMustBeInlinedIntoAScope.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
DoWhileTestCannotBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
EnumsCanBeInlinedSafely.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ExponentialGrowth.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ExponentialGrowthStandaloneSettings.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForBodyMustBeInlinedIntoAScope.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForInitializerExpressionsCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForWithoutReturnInsideCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ForWithReturnInsideCannotBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfBodyMustBeInlinedIntoAScope.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfElseBodyMustBeInlinedIntoAScope.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfElseChainWithReturnsCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfTestCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
IfWithReturnsCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineKeywordOverridesThreshold.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerAvoidsVariableNameOverlap.glsl Support half4 return values from main() in the SPIR-V code generator. 2021-01-27 02:46:03 +00:00
InlinerCanBeDisabled.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerCanBeDisabledStandaloneSettings.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerElidesTempVarForReturnsInsideBlock.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerManglesNames.glsl Support half4 return values from main() in the SPIR-V code generator. 2021-01-27 02:46:03 +00:00
InlinerUsesTempVarForMultipleReturns.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerUsesTempVarForReturnsInsideBlockWithVar.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerWrapsEarlyReturnsWithForLoop.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlinerWrapsSwitchWithReturnInsideWithForLoop.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineThreshold.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithInoutArgument.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithModifiedArgument.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithNestedBigCalls.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithNestedCalls.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithUnmodifiedArgument.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InlineWithUnnecessaryBlocks.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
ShortCircuitEvaluationsCannotInlineRightHandSide.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
StructsCanBeInlinedSafely.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwitchWithCastCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwitchWithoutReturnInsideCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
SwizzleCanBeInlinedDirectly.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
TernaryResultsCannotBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
TernaryTestCanBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
TrivialArgumentsInlineDirectly.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
WhileBodyMustBeInlinedIntoAScope.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
WhileTestCannotBeInlined.glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00