fixed Metal code generation for recursive functions

Bug: oss-fuzz:14096
Change-Id: I9a7586e4000d1398be131ee4a2b85812b14096f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209381
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
Ethan Nicholas 2019-04-19 14:00:26 -04:00 committed by Skia Commit-Bot
parent 2929f51aa4
commit 65a8f56e74

View File

@ -1649,6 +1649,7 @@ MetalCodeGenerator::Requirements MetalCodeGenerator::requirements(const Function
}
auto found = fRequirements.find(&f);
if (found == fRequirements.end()) {
fRequirements[&f] = kNo_Requirements;
for (const auto& e : fProgram) {
if (ProgramElement::kFunction_Kind == e.fKind) {
const FunctionDefinition& def = (const FunctionDefinition&) e;