aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-09 14:59:44 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 14:59:57 +0000
commitcac5b12824f0bef17df84518d36a316f56f9daec (patch)
treec639d88c46c55e1d385a1be582f301edeac66014 /src
parent8ab590f17fed097758b209c3b82fc1e4d802768e (diff)
Revert "added support for sk_ClipDistance"
This reverts commit 8b8c76506a9a3b07246e6c2770e35dfc413da97a. Reason for revert: breaks Vulkan Original change's description: > added support for sk_ClipDistance > > Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680 > Reviewed-on: https://skia-review.googlesource.com/8225 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > TBR=csmartdalton@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I84d6bc75738eb9a8e090aa60e6421f2437a027b2 Reviewed-on: https://skia-review.googlesource.com/8246 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/sksl/SkSLCompiler.h7
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp11
-rw-r--r--src/sksl/sksl_frag.include1
-rw-r--r--src/sksl/sksl_vert.include3
4 files changed, 5 insertions, 17 deletions
diff --git a/src/sksl/SkSLCompiler.h b/src/sksl/SkSLCompiler.h
index f7dcf2b5b9..167f042d52 100644
--- a/src/sksl/SkSLCompiler.h
+++ b/src/sksl/SkSLCompiler.h
@@ -17,10 +17,9 @@
#include "SkSLErrorReporter.h"
#include "SkSLIRGenerator.h"
-#define SK_FRAGCOLOR_BUILTIN 10001
-#define SK_FRAGCOORD_BUILTIN 15
-#define SK_VERTEXID_BUILTIN 5
-#define SK_CLIPDISTANCE_BUILTIN 3
+#define SK_FRAGCOLOR_BUILTIN 10001
+#define SK_FRAGCOORD_BUILTIN 15
+#define SK_VERTEXID_BUILTIN 5
namespace SkSL {
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 4b1eea3451..70e2e7761c 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -329,9 +329,6 @@ void GLSLCodeGenerator::writeVariableReference(const VariableReference& ref) {
case SK_VERTEXID_BUILTIN:
this->write("gl_VertexID");
break;
- case SK_CLIPDISTANCE_BUILTIN:
- this->write("gl_ClipDistance");
- break;
default:
this->write(ref.fVariable.fName);
}
@@ -349,13 +346,7 @@ void GLSLCodeGenerator::writeFieldAccess(const FieldAccess& f) {
this->writeExpression(*f.fBase, kPostfix_Precedence);
this->write(".");
}
- switch (f.fBase->fType.fields()[f.fFieldIndex].fModifiers.fLayout.fBuiltin) {
- case SK_CLIPDISTANCE_BUILTIN:
- this->write("gl_ClipDistance");
- break;
- default:
- this->write(f.fBase->fType.fields()[f.fFieldIndex].fName);
- }
+ this->write(f.fBase->fType.fields()[f.fFieldIndex].fName);
}
void GLSLCodeGenerator::writeSwizzle(const Swizzle& swizzle) {
diff --git a/src/sksl/sksl_frag.include b/src/sksl/sksl_frag.include
index d0e30f2574..21849866df 100644
--- a/src/sksl/sksl_frag.include
+++ b/src/sksl/sksl_frag.include
@@ -3,7 +3,6 @@ STRINGIFY(
// defines built-in interfaces supported by SkiaSL fragment shaders
layout(builtin=15) in vec4 sk_FragCoord;
-layout(builtin=3) float sk_ClipDistance[];
// 9999 is a temporary value that causes us to ignore these declarations beyond
// adding them to the symbol table. This works fine in GLSL (where they do not
diff --git a/src/sksl/sksl_vert.include b/src/sksl/sksl_vert.include
index 8e14c388a7..af74c0c54c 100644
--- a/src/sksl/sksl_vert.include
+++ b/src/sksl/sksl_vert.include
@@ -4,8 +4,7 @@ STRINGIFY(
out gl_PerVertex {
layout(builtin=0) vec4 gl_Position;
- layout(builtin=1) float gl_PointSize;
- layout(builtin=3) float sk_ClipDistance[];
+ layout(builtin=1) float gl_PointSize;
};
layout(builtin=5) int sk_VertexID;