skia2/tests/sksl/fp/golden
John Stiles 8744a5c820 Add unit test for nested function calls in FP files.
`func1` and `func2` emit bad code, `return %s()`, and because they don't
consume their `%s` format argument. This leaves the format argument list
unbalanced and all future args are wrong.

Another serious problem is that we don't actually know the names of the
functions that they need to call, because we haven't emitted them yet.

`func3` is not emitted at all. Sampling from a fragment processor
apparently fails in this context.

This is a more general case repro for skia:10684--it turns out that
recursion in particular wasn't the issue, but nested function calls just
don't work properly at all in FP files. This wasn't an issue in practice
because we don't have any existing FP files which nest function calls,
and the inliner also tends to aggressively flatten everything out if we
don't explicitly disable it.

Change-Id: Iff029c459c7d90be566f9b4c9be0e3150e459866
Bug: skia:10684
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329367
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-23 21:07:36 +00:00
..
GrChildProcessorAndGlobal.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorAndGlobal.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorFieldAccess.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorFieldAccess.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorInlineFieldAccess.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorInlineFieldAccess.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessors.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessors.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleCoords.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleCoords.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixAndCoords.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixAndCoords.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixConstant.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixConstant.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixConstantAndCoords.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixConstantAndCoords.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixMultipleUniforms.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixMultipleUniforms.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixSingleInUniform.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixSingleInUniform.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixSingleUniform.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixSingleUniform.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixSingleUniformExpr.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorSampleMatrixSingleUniformExpr.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorsWithInput.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorsWithInput.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorWithInputExpression.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrChildProcessorWithInputExpression.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrConditionalInUniform.cpp
GrConditionalInUniform.h
GrFunction.cpp
GrFunction.h
GrGrSLTypesAreSupported.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrGrSLTypesAreSupported.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrHelloWorld.cpp
GrHelloWorld.h
GrInlinedFunction.cpp Revert "Reland "Remove inliner from IR generation stage."" 2020-10-13 15:20:28 +00:00
GrInlinedFunction.h
GrInUniform.cpp
GrInUniform.h
GrInUniformCType.cpp
GrInUniformCType.h
GrKeyIn.cpp
GrKeyIn.h
GrLayoutWhen.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrLayoutWhen.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrMainCoords.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrMainCoords.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrNestedCall.cpp Add unit test for nested function calls in FP files. 2020-10-23 21:07:36 +00:00
GrNestedCall.h Add unit test for nested function calls in FP files. 2020-10-23 21:07:36 +00:00
GrNestedChildProcessors.cpp
GrNestedChildProcessors.h
GrNonInlinedInUniform.cpp
GrNonInlinedInUniform.h
GrNullableChildProcessor.cpp
GrNullableChildProcessor.h
GrSectionClass.cpp
GrSectionClass.h
GrSectionConstructor.cpp
GrSectionConstructor.h
GrSectionConstructorParams.cpp
GrSectionConstructorParams.h
GrSectionCpp.cpp
GrSectionCpp.h
GrSectionDumpInfo.cpp
GrSectionDumpInfo.h
GrSectionEmitCode.cpp
GrSectionEmitCode.h
GrSectionFields.cpp
GrSectionFields.h
GrSectionHeader.cpp
GrSectionHeader.h
GrSectionInitializers.cpp
GrSectionInitializers.h
GrSectionMake.cpp
GrSectionMake.h
GrSectionSetData.cpp
GrSectionSetData.h
GrSectionTest.cpp
GrSectionTest.h
GrTrackedInUniform.cpp
GrTrackedInUniform.h
GrUniform.cpp
GrUniform.h
GrUniformArrays.cpp Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrUniformArrays.h Convert the remaining FP tests to golden outputs. 2020-09-23 16:21:58 +00:00
GrUseExplicitReturn.cpp
GrUseExplicitReturn.h