skia2/resources/sksl/shared
John Stiles b3dcbb12ef Detect functions that fail to return a value, without using CFG.
This check now runs at function finalization time, before constant
propagation has occurred; this affected the "DeadIfStatement" test.

Our detection isn't smart enough to realize that a loop will run zero
times, so it treats `for` and `while` loops as always running at least
once. This isn't strictly correct, but it actually mirrors how the CFG
implementation works anyway. The only downside is that we would not flag
code like `for (i=0; i<0; ++i) { return x; }` as an error.

Change-Id: I5e43a6ee3a3993045559f0fb0646d36112543a94
Bug: skia:11377
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379056
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-04 22:47:05 +00:00
..
ArrayConstructors.sksl Reland "Improve support for arrays in Metal." 2021-02-04 17:33:28 +00:00
ArrayIndexTypes.sksl
ArrayTypes.sksl Reland "Improve support for arrays in Metal." 2021-02-04 17:33:28 +00:00
Assignment.sksl Support structs in runtime effects 2021-02-11 21:09:15 +00:00
Caps.sksl
CastsRoundTowardZero.sksl Migrate more SkSL tests to run in dm. 2021-02-03 23:45:15 +00:00
Clockwise.sksl
CommaMixedTypes.sksl Add more dm tests for the comma operator. 2021-02-03 01:28:48 +00:00
CommaSideEffects.sksl Add test to verify side effects from the comma operator. 2021-02-01 16:16:58 +00:00
ComplexDelete.sksl
ConstantIf.sksl Update various shared/ tests to run in dm. 2021-02-01 22:06:59 +00:00
ConstArray.sksl
ConstVariableComparison.sksl Align SkSL const rules more closely with GLSL 2021-02-26 17:44:11 +00:00
Control.sksl
DeadDoWhileLoop.sksl
DeadIfStatement.sksl Detect functions that fail to return a value, without using CFG. 2021-03-04 22:47:05 +00:00
DeadLoopVariable.sksl Migrate more SkSL tests to run in dm. 2021-02-03 23:45:15 +00:00
DeadStripFunctions.sksl # Enter a description of the change. 2021-03-03 22:21:36 +00:00
DependentInitializers.sksl Update various shared/ tests to run in dm. 2021-02-01 22:06:59 +00:00
Derivatives.sksl
DerivativesFlipY.sksl
DerivativesUnused.sksl
Discard.sksl Optimize @switch statements in SwitchStatement::Make. 2021-02-23 21:36:04 +00:00
DoWhileControlFlow.sksl
EmptyBlocksES2.sksl Disallow unscoped for blocks which declare a variable. 2021-03-04 17:04:40 +00:00
EmptyBlocksES3.sksl Disallow unscoped for blocks which declare a variable. 2021-03-04 17:04:40 +00:00
Enum.sksl Optimize @switch statements in SwitchStatement::Make. 2021-02-23 21:36:04 +00:00
ForLoopControlFlow.sksl Reland "Add SkSL for-loop control flow test to dm." 2021-01-27 15:46:39 +00:00
FragCoordsFlipY.sksl
FragCoordsNew.sksl
FragCoordsOld.sksl
FunctionArgTypeMatch.sksl Update function-type-matching tests to work as Runtime Effects. 2021-02-02 13:47:35 +00:00
FunctionPrototype.sksl Migrate more SkSL tests to run in dm. 2021-02-03 23:45:15 +00:00
FunctionReturnTypeMatch.sksl Update function-type-matching tests to work as Runtime Effects. 2021-02-02 13:47:35 +00:00
Functions.sksl Migrate more SkSL tests to run in dm. 2021-02-03 23:45:15 +00:00
GaussianBlur.sksl
GeometricIntrinsics.sksl Eliminate left-side comma expressions without side effects. 2021-02-05 16:50:33 +00:00
Geometry.geom
GeometryExtension.geom
GeometryGSInvocations.geom
GeometryNoGSInvocations.geom
GeometryNoGSInvocationsReorder.geom
Height.sksl
HelloWorld.sksl Migrate more SkSL tests to run in dm. 2021-02-03 23:45:15 +00:00
Hex.sksl Re-enable SkSL Hex test with constants that fit in 16 bits. 2021-02-04 17:15:08 +00:00
HexUnsigned.sksl Migrate more SkSL tests to run in dm. 2021-02-03 23:45:15 +00:00
InstanceID.vert
InterfaceBlockNamed.sksl
InterfaceBlockNamedArray.sksl Add default uniform binding value for Metal/SPIR-V. 2021-01-28 19:23:49 +00:00
Matrices.sksl Revert "Add support for matrix == and != in Metal shaders." 2021-02-10 14:25:54 +00:00
MatricesNonsquare.sksl Migrate matrix SkSL test to dm. 2021-02-03 20:42:57 +00:00
MatrixEquality.sksl Add SkSL test for matrix equality/inequality operators. 2021-02-10 18:57:22 +00:00
MultipleAssignments.sksl Migrate additional SkSL tests to run in dm. 2021-02-04 22:12:27 +00:00
NegatedVectorLiteral.sksl Migrate additional SkSL tests to run in dm. 2021-02-04 22:12:27 +00:00
NoFragCoordsPos.vert
NoFragCoordsPosRT.vert
NormalizationGeo.geom
NormalizationVert.vert
NumberCasts.sksl Migrate additional SkSL tests to run in dm. 2021-02-04 22:12:27 +00:00
NumberConversions.sksl
Offset.sksl
OperatorsES2.sksl Avoid comma usage in Operators test. 2021-02-02 14:34:24 +00:00
OperatorsES3.sksl Run the SkSL Operators test as a Runtime Effect. 2021-02-01 17:21:33 +00:00
Ossfuzz26167.sksl
Ossfuzz28050.sksl
Ossfuzz28794.sksl
Ossfuzz28904.sksl
Ossfuzz29444.sksl
Ossfuzz29494.sksl Use unsigned values when constant-folding integer vectors 2021-02-01 21:44:28 +00:00
OutParams.sksl Migrate additional SkSL tests to run in dm. 2021-02-04 22:12:27 +00:00
OutParamsTricky.sksl Fix SPIR-V bug with swizzled out parameters. 2021-02-12 15:21:27 +00:00
RectangleTexture.sksl
ResizeMatrix.sksl Migrate even more SkSL tests to run in dm. 2021-02-05 16:04:43 +00:00
ResizeMatrixNonsquare.sksl Migrate even more SkSL tests to run in dm. 2021-02-05 16:04:43 +00:00
ReturnBadTypeFromMain.sksl Support half4 return values from main() in the SPIR-V code generator. 2021-01-27 02:46:03 +00:00
ReturnColorFromMain.sksl Support half4 return values from main() in the SPIR-V code generator. 2021-01-27 02:46:03 +00:00
ReturnsValueOnEveryPathES2.sksl Detect functions that fail to return a value, without using CFG. 2021-03-04 22:47:05 +00:00
ReturnsValueOnEveryPathES3.sksl Detect functions that fail to return a value, without using CFG. 2021-03-04 22:47:05 +00:00
SampleLocations.vert
SampleMask.sksl
ScalarConversionConstructorsES2.sksl Migrate even more SkSL tests to run in dm. 2021-02-05 16:04:43 +00:00
ScalarConversionConstructorsES3.sksl Migrate even more SkSL tests to run in dm. 2021-02-05 16:04:43 +00:00
ScopedSymbol.sksl
StackingVectorCasts.sksl Migrate even more SkSL tests to run in dm. 2021-02-05 16:04:43 +00:00
StaticIf.sksl # Enter a description of the change. 2021-03-03 22:21:36 +00:00
StaticSwitch.sksl Optimize @switch statements in SwitchStatement::Make. 2021-02-23 21:36:04 +00:00
StaticSwitchWithBreak.sksl
StaticSwitchWithBreakInsideBlock.sksl
StaticSwitchWithConditionalBreak.sksl
StaticSwitchWithConditionalBreakInsideBlock.sksl
StaticSwitchWithContinue.sksl Fix switch optimization pass. 2021-02-23 15:38:24 +00:00
StaticSwitchWithFallthroughA.sksl
StaticSwitchWithFallthroughB.sksl
StaticSwitchWithStaticConditionalBreak.sksl
StaticSwitchWithStaticConditionalBreakInsideBlock.sksl
StructMaxDepth.sksl
Structs.sksl
StructsInFunctions.sksl Add SkSL test for functions that operate on structs 2021-01-28 17:01:59 +00:00
Switch.sksl
SwitchContainingDeadCode.sksl
SwitchWithFallthrough.sksl
SwizzleBoolConstants.sksl Migrate even more SkSL tests to run in dm. 2021-02-05 16:04:43 +00:00
SwizzleByConstantIndex.sksl Migrate some SkSL swizzle tests to dm. 2021-02-08 16:16:28 +00:00
SwizzleByIndex.sksl Migrate some SkSL swizzle tests to dm. 2021-02-08 16:16:28 +00:00
SwizzleConstants.sksl Migrate some SkSL swizzle tests to dm. 2021-02-08 16:16:28 +00:00
SwizzleLTRB.sksl Migrate some SkSL swizzle tests to dm. 2021-02-08 16:16:28 +00:00
SwizzleOpt.sksl Migrate some SkSL swizzle tests to dm. 2021-02-08 16:16:28 +00:00
SwizzleScalar.sksl Migrate some SkSL swizzle tests to dm. 2021-02-08 16:16:28 +00:00
TernaryAsLValueEntirelyFoldable.sksl Migrate the last SkSL tests in shared/ to dm. 2021-02-08 21:37:48 +00:00
TernaryAsLValueFoldableTest.sksl Migrate the last SkSL tests in shared/ to dm. 2021-02-08 21:37:48 +00:00
Texture1D.sksl
Texture2D.sksl
TextureSharpen.sksl
UnaryPositiveNegative.sksl Migrate the last SkSL tests in shared/ to dm. 2021-02-08 21:37:48 +00:00
UniformArray.sksl Add default uniform set value to SkSL Program settings. 2021-01-27 00:52:16 +00:00
UniformBuffers.sksl Add default uniform binding value for Metal/SPIR-V. 2021-01-28 19:23:49 +00:00
Uniforms.sksl Add default uniform binding value for Metal/SPIR-V. 2021-01-28 19:23:49 +00:00
UnusedVariables.sksl Migrate the last SkSL tests in shared/ to dm. 2021-02-08 21:37:48 +00:00
VectorConstructors.sksl Migrate the last SkSL tests in shared/ to dm. 2021-02-08 21:37:48 +00:00
VertexEarlyReturn.vert
VertexID.vert
WhileLoopControlFlow.sksl Add unit test for control statements in while loops. 2021-01-26 17:07:36 +00:00
Width.sksl