skia2/tests/sksl/shared/golden
John Stiles 7d3f089e58 Fix use-after-free error discovered by the fuzzer.
When eliminating a CFG node, we now flag its exit nodes; if our
optimization pass reaches one of those flagged nodes, we stop the
current optimization process in its tracks and initiate a rescan.

We do NOT recursively mark the exits of the exit nodes, so this fix is
reliant on the CFG being ordered in a non-chaotic fashion, but in
practice this seems to be sufficient for the CFGs we generate today.

Change-Id: I892805361c5f4297e02146f37a759dfda83f5488
Bug: oss-fuzz:26942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331597
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-03 17:59:02 +00:00
..
ArrayConstructors.glsl
ArrayConstructors.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ArrayIndexTypes.glsl
ArrayIndexTypes.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ArrayTypes.glsl
ArrayTypes.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Assignment.glsl Add unit tests for assignment and invalid field access. 2020-09-25 21:42:22 +00:00
Assignment.metal Add unit tests for assignment and invalid field access. 2020-09-25 21:42:22 +00:00
BoolFolding.glsl
BoolFolding.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Caps.glsl Disable "any" function workaround in standalone/non-GPU caps 2020-11-03 17:36:43 +00:00
Caps.metal Disable "any" function workaround in standalone/non-GPU caps 2020-11-03 17:36:43 +00:00
CastsRoundTowardZero.glsl
CastsRoundTowardZero.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Clockwise.glsl
Clockwise.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ComplexDelete.glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ComplexDelete.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ConstantIf.glsl
ConstantIf.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ConstArray.glsl
ConstArray.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ConstVariableComparison.glsl
ConstVariableComparison.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Control.glsl
Control.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
CrossIntrinsic.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
CrossIntrinsicStandaloneSettings.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
DeadDoWhileLoop.glsl
DeadDoWhileLoop.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
DeadIfStatement.glsl Fix use-after-free error discovered by the fuzzer. 2020-11-03 17:59:02 +00:00
DeadIfStatement.metal Fix use-after-free error discovered by the fuzzer. 2020-11-03 17:59:02 +00:00
DeadLoopVariable.glsl
DeadLoopVariable.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
DependentInitializers.glsl
DependentInitializers.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Derivatives.glsl
DerivativesFlipY.glsl
DerivativesFlipYStandaloneSettings.glsl
DerivativesStandaloneSettings.glsl
DerivativesUnused.glsl
DerivativesUnused.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Discard.glsl Always declare sk_FragColor in GLSL, even if unused 2020-10-20 21:13:31 +00:00
Discard.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
FloatFolding.glsl
FloatFolding.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
FragCoordsFlipY.glsl
FragCoordsFlipY.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
FragCoordsNew.glsl
FragCoordsNew.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
FragCoordsOld.glsl
FragCoordsOld.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
FrExp.glsl
FrExp.metal Fix frexp support in Metal. 2020-10-20 15:31:31 +00:00
FunctionArgumentMatch.glsl
FunctionArgumentMatch.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
FunctionPrototype.glsl Add test cases to function-prototype golden outputs. 2020-11-02 17:17:23 +00:00
FunctionPrototype.metal Add test cases to function-prototype golden outputs. 2020-11-02 17:17:23 +00:00
Functions.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
Functions.metal Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
Geometry.glsl
Geometry.metal Fail gracefully when Metal encounters a geometry shader. 2020-09-25 21:21:50 +00:00
GeometryExtension.glsl
GeometryExtension.metal Fail gracefully when Metal encounters a geometry shader. 2020-09-25 21:21:50 +00:00
GeometryGSInvocations.glsl
GeometryGSInvocations.metal Fail gracefully when Metal encounters a geometry shader. 2020-09-25 21:21:50 +00:00
GeometryNoGSInvocations.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
GeometryNoGSInvocations.metal Fail gracefully when Metal encounters a geometry shader. 2020-09-25 21:21:50 +00:00
GeometryNoGSInvocationsReorder.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
GeometryNoGSInvocationsReorder.metal Add geometry shader test demonstrating max_vertices/invocations bug 2020-10-12 21:19:33 +00:00
Height.glsl
Height.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
HelloWorld.glsl
HelloWorld.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Hex.glsl
Hex.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
InstanceID.glsl
InstanceID.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
InterfaceBlockAnonymous.glsl
InterfaceBlockAnonymous.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
InterfaceBlockArray.glsl
InterfaceBlockArray.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
InterfaceBlockNamed.glsl
InterfaceBlockNamed.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
IntFolding.glsl Add unit test to demonstrate error with modulo in FP files. 2020-10-29 20:46:08 +00:00
IntFolding.metal Add unit test to demonstrate error with modulo in FP files. 2020-10-29 20:46:08 +00:00
Matrices.glsl
Matrices.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
MatrixFolding.glsl
MatrixFolding.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
MultipleAssignments.glsl
MultipleAssignments.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NegatedVectorLiteral.glsl
NegatedVectorLiteral.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NoFragCoordsPos.glsl
NoFragCoordsPos.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NoFragCoordsPosRT.glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NoFragCoordsPosRT.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NormalizationGeo.glsl
NormalizationGeo.metal Fail gracefully when Metal encounters a geometry shader. 2020-09-25 21:21:50 +00:00
NormalizationVert.glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NormalizationVert.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
NumberConversions.glsl
NumberConversions.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Offset.glsl
Offset.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Operators.glsl Only include one variable per declaration statement 2020-10-07 17:27:01 +00:00
Operators.metal Only include one variable per declaration statement 2020-10-07 17:27:01 +00:00
Ossfuzz26167.glsl Fix use-after-free discovered by fuzzer. 2020-10-23 16:10:15 +00:00
Ossfuzz26167.metal Fix use-after-free discovered by fuzzer. 2020-10-23 16:10:15 +00:00
OutParams.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
OutParams.metal Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
OutParamsTricky.glsl Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
OutParamsTricky.metal Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
RectangleTexture.glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
RectangleTexture.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ResizeMatrix.glsl
ResizeMatrix.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SampleMask.glsl
SampleMask.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ScopedSymbol.glsl
ScopedSymbol.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
ShortCircuitBoolFolding.glsl
ShortCircuitBoolFolding.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StackingVectorCasts.glsl
StackingVectorCasts.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticIf.glsl
StaticIf.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitch.glsl
StaticSwitch.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithBreak.glsl
StaticSwitchWithBreak.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithBreakInsideBlock.glsl
StaticSwitchWithBreakInsideBlock.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithConditionalBreak.glsl
StaticSwitchWithConditionalBreak.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithConditionalBreakInsideBlock.glsl
StaticSwitchWithConditionalBreakInsideBlock.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithFallthroughA.glsl
StaticSwitchWithFallthroughA.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithFallthroughB.glsl
StaticSwitchWithFallthroughB.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithStaticConditionalBreak.glsl
StaticSwitchWithStaticConditionalBreak.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
StaticSwitchWithStaticConditionalBreakInsideBlock.glsl
StaticSwitchWithStaticConditionalBreakInsideBlock.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Structs.glsl
Structs.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Switch.glsl
Switch.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwitchContainingDeadCode.glsl
SwitchContainingDeadCode.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwitchWithFallthrough.glsl
SwitchWithFallthrough.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwizzleBoolConstants.glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwizzleBoolConstants.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwizzleConstants.glsl
SwizzleConstants.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwizzleLTRB.glsl
SwizzleLTRB.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
SwizzleOpt.glsl Add unit test to demonstrate lack of SkSL swizzle optimization. 2020-09-28 19:02:03 +00:00
SwizzleOpt.metal Add unit test to demonstrate lack of SkSL swizzle optimization. 2020-09-28 19:02:03 +00:00
SwizzleScalar.glsl
SwizzleScalar.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
TernaryAsLValueEntirelyFoldable.glsl
TernaryAsLValueEntirelyFoldable.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
TernaryAsLValueFoldableTest.glsl Only include one variable per declaration statement 2020-10-07 17:27:01 +00:00
TernaryAsLValueFoldableTest.metal Only include one variable per declaration statement 2020-10-07 17:27:01 +00:00
Texture1D.glsl Split Texture test into separate 1D and 2D tests. 2020-11-02 14:39:31 +00:00
Texture1D.metal Split Texture test into separate 1D and 2D tests. 2020-11-02 14:39:31 +00:00
Texture2D.glsl Split Texture test into separate 1D and 2D tests. 2020-11-02 14:39:31 +00:00
Texture2D.metal Split Texture test into separate 1D and 2D tests. 2020-11-02 14:39:31 +00:00
TextureSharpen.glsl Detect non-2D textures in MetalCodeGenerator and fail cleanly 2020-10-02 20:36:04 +00:00
TextureSharpen.metal Detect non-2D textures in MetalCodeGenerator and fail cleanly 2020-10-02 20:36:04 +00:00
UnaryPositiveNegative.glsl
UnaryPositiveNegative.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
UnusedVariables.glsl Only include one variable per declaration statement 2020-10-07 17:27:01 +00:00
UnusedVariables.metal Only include one variable per declaration statement 2020-10-07 17:27:01 +00:00
VectorConstructors.glsl
VectorConstructors.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
VectorFolding.glsl
VectorFolding.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
VertexID.glsl
VertexID.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
Width.glsl
Width.metal Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00