aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLGLSLCodeGenerator.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-16 16:37:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-17 22:00:23 +0000
commit52cad15d0b4443b763a7d41ec8d1131a7638f866 (patch)
tree67c5e00fd79130b1c49b93556152cf29480b3a58 /src/sksl/SkSLGLSLCodeGenerator.cpp
parentc12551c1f3f34f50cd58b4e3fb0697c7fe40e8f0 (diff)
sksl support for geometry shaders
BUG=skia: Change-Id: I8541b98aadcf4c2484fef73e2f49be3ee38bc1e2 Reviewed-on: https://skia-review.googlesource.com/8409 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 18cfba79e9..3f5f9d1b39 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -332,6 +332,12 @@ void GLSLCodeGenerator::writeVariableReference(const VariableReference& ref) {
case SK_CLIPDISTANCE_BUILTIN:
this->write("gl_ClipDistance");
break;
+ case SK_IN_BUILTIN:
+ this->write("gl_in");
+ break;
+ case SK_INVOCATIONID_BUILTIN:
+ this->write("gl_InvocationID");
+ break;
default:
this->write(ref.fVariable.fName);
}
@@ -584,7 +590,7 @@ void GLSLCodeGenerator::writeModifiers(const Modifiers& modifiers,
}
void GLSLCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) {
- if (intf.fTypeName == "gl_PerVertex") {
+ if (intf.fTypeName == "sk_PerVertex") {
return;
}
this->writeModifiers(intf.fVariable.fModifiers, true);