aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-04-17 14:22:15 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-18 19:13:13 +0000
commit061020eab431e9bf43fe47ace659fedf367c0745 (patch)
tree6080dd5d00f0a452f7487c58985b4fbd3f830434 /src/sksl
parentb120e9291a7d43347ebce89de522a15771cd9dea (diff)
With ES3, enable both ES2 and ES3 external image extensions
Bug: skia:7713 Change-Id: If06c0368e91c33bbac9e7715227d619c4834684f Reviewed-on: https://skia-review.googlesource.com/121884 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/sksl')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp5
-rw-r--r--src/sksl/SkSLUtil.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index bcf45ba7be..84c16d40f8 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -1089,6 +1089,11 @@ void GLSLCodeGenerator::writeVarDeclarations(const VarDeclarations& decl, bool g
fHeader.writeText(fProgram.fSettings.fCaps->externalTextureExtensionString());
fHeader.writeText(" : require\n");
}
+ if (fProgram.fSettings.fCaps->secondExternalTextureExtensionString()) {
+ fHeader.writeText("#extension ");
+ fHeader.writeText(fProgram.fSettings.fCaps->secondExternalTextureExtensionString());
+ fHeader.writeText(" : require\n");
+ }
fFoundExternalSamplerDecl = true;
}
}
diff --git a/src/sksl/SkSLUtil.h b/src/sksl/SkSLUtil.h
index dc87246605..40a5a4774f 100644
--- a/src/sksl/SkSLUtil.h
+++ b/src/sksl/SkSLUtil.h
@@ -155,6 +155,10 @@ public:
return nullptr;
}
+ const char* secondExternalTextureExtensionString() const {
+ return nullptr;
+ }
+
const char* versionDeclString() const {
return "";
}