aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLMain.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2016-10-18 15:48:46 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-18 15:48:54 +0000
commitac66ae63eade5347864c5d0bd025756c5ea23fda (patch)
tree1013a7fc20ad5986086e9cd7f3f0219246faff3e /src/sksl/SkSLMain.cpp
parentb36a3cd137e2b6c328854015018594bb9967e493 (diff)
Revert "re-land of skslc now automatically turns on derivatives support"
This reverts commit d7d1997643db3b9b5caaaac235c0e2cd0fa23ec2. This breaks the Chromium roll (it did last time it landed too). https://codereview.chromium.org/2429853002 Please gate your next attempt on at least one of linux_android_rel_ng, linux_chromium_rel_ng, or mac_chromium_rel_ng. TBR=benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I999d4af70a5704b8990f3cd7d145eabff57646f5 Reviewed-on: https://skia-review.googlesource.com/3590 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/sksl/SkSLMain.cpp')
-rw-r--r--src/sksl/SkSLMain.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sksl/SkSLMain.cpp b/src/sksl/SkSLMain.cpp
index eb07b4d032..fe925e0c6e 100644
--- a/src/sksl/SkSLMain.cpp
+++ b/src/sksl/SkSLMain.cpp
@@ -16,6 +16,18 @@ bool endsWith(const std::string& s, const std::string& ending) {
return false;
}
+static SkSL::GLCaps default_caps() {
+ return {
+ 400,
+ SkSL::GLCaps::kGL_Standard,
+ false, // isCoreProfile
+ false, // usesPrecisionModifiers;
+ false, // mustDeclareFragmentShaderOutput
+ true, // canUseMinAndAbsTogether
+ false // mustForceNegatedAtanParamToFloat
+ };
+}
+
/**
* Very simple standalone executable to facilitate testing.
*/
@@ -57,7 +69,7 @@ int main(int argc, const char** argv) {
} else if (endsWith(name, ".glsl")) {
std::ofstream out(argv[2], std::ofstream::binary);
SkSL::Compiler compiler;
- if (!compiler.toGLSL(kind, text, SkSL::GLCaps(), out)) {
+ if (!compiler.toGLSL(kind, text, default_caps(), out)) {
printf("%s", compiler.errorText().c_str());
exit(3);
}