Revert "Switched highp float to highfloat and mediump float to half."
This reverts commit 88d99c63878c2d3d340120f0321676f72afcb4f0.
Reason for revert: Believed to be causing unit test failures in Chrome roll:
https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0
Original change's description:
> Switched highp float to highfloat and mediump float to half.
>
> The ultimate goal is to end up with "float" and "half", but this
> intermediate step uses "highfloat" so that it is clear if I missed a
> "float" somewhere. Once this lands, a subsequent CL will switch all
> "highfloats" back to "floats".
>
> Bug: skia:
> Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
> Reviewed-on: https://skia-review.googlesource.com/31000
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com
Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/35705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index af1c4b7..4ea956c 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -197,8 +197,9 @@
*fContext.fSkArgs_Type, Variable::kGlobal_Storage);
fIRGenerator->fSymbolTable->add(skArgsName, std::unique_ptr<Symbol>(skArgs));
- std::vector<std::unique_ptr<ProgramElement>> ignored;
- fIRGenerator->convertProgram(String(SKSL_INCLUDE), *fTypes, &ignored);
+ Modifiers::Flag ignored1;
+ std::vector<std::unique_ptr<ProgramElement>> ignored2;
+ fIRGenerator->convertProgram(String(SKSL_INCLUDE), *fTypes, &ignored1, &ignored2);
fIRGenerator->fSymbolTable->markAllFunctionsBuiltin();
ASSERT(!fErrorCount);
}
@@ -1131,22 +1132,24 @@
fErrorCount = 0;
fIRGenerator->start(&settings);
std::vector<std::unique_ptr<ProgramElement>> elements;
+ Modifiers::Flag ignored;
switch (kind) {
case Program::kVertex_Kind:
- fIRGenerator->convertProgram(String(SKSL_VERT_INCLUDE), *fTypes, &elements);
+ fIRGenerator->convertProgram(String(SKSL_VERT_INCLUDE), *fTypes, &ignored, &elements);
break;
case Program::kFragment_Kind:
- fIRGenerator->convertProgram(String(SKSL_FRAG_INCLUDE), *fTypes, &elements);
+ fIRGenerator->convertProgram(String(SKSL_FRAG_INCLUDE), *fTypes, &ignored, &elements);
break;
case Program::kGeometry_Kind:
- fIRGenerator->convertProgram(String(SKSL_GEOM_INCLUDE), *fTypes, &elements);
+ fIRGenerator->convertProgram(String(SKSL_GEOM_INCLUDE), *fTypes, &ignored, &elements);
break;
case Program::kFragmentProcessor_Kind:
- fIRGenerator->convertProgram(String(SKSL_FP_INCLUDE), *fTypes, &elements);
+ fIRGenerator->convertProgram(String(SKSL_FP_INCLUDE), *fTypes, &ignored, &elements);
break;
}
fIRGenerator->fSymbolTable->markAllFunctionsBuiltin();
- fIRGenerator->convertProgram(text, *fTypes, &elements);
+ Modifiers::Flag defaultPrecision;
+ fIRGenerator->convertProgram(text, *fTypes, &defaultPrecision, &elements);
if (!fErrorCount) {
for (auto& element : elements) {
if (element->fKind == ProgramElement::kFunction_Kind) {
@@ -1154,7 +1157,7 @@
}
}
}
- auto result = std::unique_ptr<Program>(new Program(kind, settings, &fContext,
+ auto result = std::unique_ptr<Program>(new Program(kind, settings, defaultPrecision, &fContext,
std::move(elements),
fIRGenerator->fSymbolTable,
fIRGenerator->fInputs));