diff options
author | Brian Osman <brianosman@google.com> | 2018-04-17 14:22:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-18 19:13:13 +0000 |
commit | 061020eab431e9bf43fe47ace659fedf367c0745 (patch) | |
tree | 6080dd5d00f0a452f7487c58985b4fbd3f830434 /src/sksl | |
parent | b120e9291a7d43347ebce89de522a15771cd9dea (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.cpp | 5 | ||||
-rw-r--r-- | src/sksl/SkSLUtil.h | 4 |
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 ""; } |