re-re-land of skslc now automatically turns on derivatives support
Only change from last attempt is putting the call to shaderDerivativeExtensionString behind a check for shaderDerivativeSupport to avoid a spurious assertion failure.
TBR=benjaminwagner@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2437063002
Review-Url: https://chromiumcodereview.appspot.com/2437063002
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index d4fbc95..5b502dc 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -19,6 +19,7 @@
#include "ir/SkSLIntLiteral.h"
#include "ir/SkSLModifiersDeclaration.h"
#include "ir/SkSLSymbolTable.h"
+#include "ir/SkSLUnresolvedFunction.h"
#include "ir/SkSLVarDeclarations.h"
#include "SkMutex.h"
@@ -135,6 +136,7 @@
Modifiers::Flag ignored1;
std::vector<std::unique_ptr<ProgramElement>> ignored2;
this->internalConvertProgram(SKSL_INCLUDE, &ignored1, &ignored2);
+ fIRGenerator->fSymbolTable->markAllFunctionsBuiltin();
ASSERT(!fErrorCount);
}
@@ -393,10 +395,11 @@
this->internalConvertProgram(SKSL_FRAG_INCLUDE, &ignored, &elements);
break;
}
+ fIRGenerator->fSymbolTable->markAllFunctionsBuiltin();
Modifiers::Flag defaultPrecision;
this->internalConvertProgram(text, &defaultPrecision, &elements);
auto result = std::unique_ptr<Program>(new Program(kind, defaultPrecision, std::move(elements),
- fIRGenerator->fSymbolTable));;
+ fIRGenerator->fSymbolTable));
fIRGenerator->popSymbolTable();
this->writeErrorCount();
return result;