tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrGLSL_DEFINED |
| 9 | #define GrGLSL_DEFINED |
| 10 | |
tomhudson@google.com | 6bf38b5 | 2012-02-14 15:11:59 +0000 | [diff] [blame] | 11 | #include "gl/GrGLInterface.h" |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 12 | #include "GrColor.h" |
commit-bot@chromium.org | ff6ea26 | 2013-03-12 12:26:08 +0000 | [diff] [blame] | 13 | #include "GrTypesPriv.h" |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 14 | #include "SkString.h" |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 15 | |
commit-bot@chromium.org | 06f0598 | 2013-08-30 15:52:36 +0000 | [diff] [blame] | 16 | class GrGLContextInfo; |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 17 | class GrGLShaderVar; |
| 18 | |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 19 | // Limited set of GLSL versions we build shaders for. Caller should round |
| 20 | // down the GLSL version to one of these enums. |
| 21 | enum GrGLSLGeneration { |
| 22 | /** |
bsalomon@google.com | 281c726 | 2012-10-23 14:31:30 +0000 | [diff] [blame] | 23 | * Desktop GLSL 1.10 and ES2 shading language (based on desktop GLSL 1.20) |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 24 | */ |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 25 | k110_GrGLSLGeneration, |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 26 | /** |
| 27 | * Desktop GLSL 1.30 |
| 28 | */ |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 29 | k130_GrGLSLGeneration, |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 30 | /** |
bsalomon@google.com | 281c726 | 2012-10-23 14:31:30 +0000 | [diff] [blame] | 31 | * Desktop GLSL 1.40 |
| 32 | */ |
| 33 | k140_GrGLSLGeneration, |
| 34 | /** |
| 35 | * Desktop GLSL 1.50 |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 36 | */ |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 37 | k150_GrGLSLGeneration, |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
tomhudson@google.com | 168e634 | 2012-04-18 17:49:20 +0000 | [diff] [blame] | 40 | /** |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 41 | * Gets the most recent GLSL Generation compatible with the OpenGL context. |
| 42 | */ |
| 43 | GrGLSLGeneration GrGetGLSLGeneration(GrGLBinding binding, |
| 44 | const GrGLInterface* gl); |
| 45 | |
| 46 | /** |
bsalomon@google.com | 281c726 | 2012-10-23 14:31:30 +0000 | [diff] [blame] | 47 | * Returns a string to include at the beginning of a shader to declare the GLSL |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 48 | * version. |
| 49 | */ |
commit-bot@chromium.org | 06f0598 | 2013-08-30 15:52:36 +0000 | [diff] [blame] | 50 | const char* GrGetGLSLVersionDecl(const GrGLContextInfo&); |
bsalomon@google.com | e55fd0f | 2012-02-10 15:56:06 +0000 | [diff] [blame] | 51 | |
| 52 | /** |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 53 | * Converts a GrSLType to a string containing the name of the equivalent GLSL type. |
| 54 | */ |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 55 | static inline const char* GrGLSLTypeString(GrSLType t) { |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 56 | switch (t) { |
| 57 | case kVoid_GrSLType: |
| 58 | return "void"; |
| 59 | case kFloat_GrSLType: |
| 60 | return "float"; |
| 61 | case kVec2f_GrSLType: |
| 62 | return "vec2"; |
| 63 | case kVec3f_GrSLType: |
| 64 | return "vec3"; |
| 65 | case kVec4f_GrSLType: |
| 66 | return "vec4"; |
| 67 | case kMat33f_GrSLType: |
| 68 | return "mat3"; |
| 69 | case kMat44f_GrSLType: |
| 70 | return "mat4"; |
| 71 | case kSampler2D_GrSLType: |
| 72 | return "sampler2D"; |
| 73 | default: |
| 74 | GrCrash("Unknown shader var type."); |
| 75 | return ""; // suppress warning |
| 76 | } |
| 77 | } |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 78 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 79 | /** A generic base-class representing a GLSL expression. |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 80 | * The instance can be a variable name, expression or vecN(0) or vecN(1). Does simple constant |
| 81 | * folding with help of 1 and 0. |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 82 | * |
| 83 | * Clients should not use this class, rather the specific instantiations defined |
| 84 | * later, for example GrGLSLExpr4. |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 85 | */ |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 86 | template <typename Self> |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 87 | class GrGLSLExpr { |
| 88 | public: |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 89 | bool isOnes() const { return kOnes_ExprType == fType; } |
| 90 | bool isZeros() const { return kZeros_ExprType == fType; } |
| 91 | |
| 92 | const char* c_str() const { |
| 93 | if (kZeros_ExprType == fType) { |
| 94 | return Self::ZerosStr(); |
| 95 | } else if (kOnes_ExprType == fType) { |
| 96 | return Self::OnesStr(); |
| 97 | } |
| 98 | SkASSERT(!fExpr.isEmpty()); // Empty expressions should not be used. |
| 99 | return fExpr.c_str(); |
| 100 | } |
| 101 | |
| 102 | protected: |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 103 | /** Constructs an invalid expression. |
| 104 | * Useful only as a return value from functions that never actually return |
| 105 | * this and instances that will be assigned to later. */ |
| 106 | GrGLSLExpr() |
| 107 | : fType(kFullExpr_ExprType) { |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 108 | // The only constructor that is allowed to build an empty expression. |
| 109 | SkASSERT(!this->isValid()); |
| 110 | } |
| 111 | |
| 112 | /** Constructs an expression with all components as value v */ |
| 113 | explicit GrGLSLExpr(int v) { |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 114 | if (v == 0) { |
| 115 | fType = kZeros_ExprType; |
| 116 | } else if (v == 1) { |
| 117 | fType = kOnes_ExprType; |
| 118 | } else { |
| 119 | fType = kFullExpr_ExprType; |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 120 | fExpr.appendf(Self::CastIntStr(), v); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 121 | } |
| 122 | } |
| 123 | |
| 124 | /** Constructs an expression from a string. |
| 125 | * Argument expr is a simple expression or a parenthesized expression. */ |
| 126 | // TODO: make explicit once effects input Exprs. |
| 127 | GrGLSLExpr(const char expr[]) { |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 128 | if (NULL == expr) { // TODO: remove this once effects input Exprs. |
| 129 | fType = kOnes_ExprType; |
| 130 | } else { |
| 131 | fType = kFullExpr_ExprType; |
| 132 | fExpr = expr; |
| 133 | } |
| 134 | SkASSERT(this->isValid()); |
| 135 | } |
| 136 | |
| 137 | /** Constructs an expression from a string. |
| 138 | * Argument expr is a simple expression or a parenthesized expression. */ |
| 139 | // TODO: make explicit once effects input Exprs. |
| 140 | GrGLSLExpr(const SkString& expr) { |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 141 | if (expr.isEmpty()) { // TODO: remove this once effects input Exprs. |
| 142 | fType = kOnes_ExprType; |
| 143 | } else { |
| 144 | fType = kFullExpr_ExprType; |
| 145 | fExpr = expr; |
| 146 | } |
| 147 | SkASSERT(this->isValid()); |
| 148 | } |
| 149 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 150 | /** Constructs an expression from a string with one substitution. */ |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 151 | GrGLSLExpr(const char format[], const char in0[]) |
| 152 | : fType(kFullExpr_ExprType) { |
| 153 | fExpr.appendf(format, in0); |
| 154 | } |
| 155 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 156 | /** Constructs an expression from a string with two substitutions. */ |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 157 | GrGLSLExpr(const char format[], const char in0[], const char in1[]) |
| 158 | : fType(kFullExpr_ExprType) { |
| 159 | fExpr.appendf(format, in0, in1); |
| 160 | } |
| 161 | |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 162 | bool isValid() const { |
| 163 | return kFullExpr_ExprType != fType || !fExpr.isEmpty(); |
| 164 | } |
| 165 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 166 | /** Returns expression casted to another type. |
| 167 | * Generic implementation that is called for non-trivial cases of casts. */ |
| 168 | template <typename T> |
| 169 | static Self VectorCastImpl(const T& other); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 170 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 171 | /** Returns a GLSL multiplication: component-wise or component-by-scalar. |
| 172 | * The multiplication will be component-wise or multiply each component by a scalar. |
| 173 | * |
| 174 | * The returned expression will compute the value of: |
| 175 | * vecN(in0.x * in1.x, ...) if dim(T0) == dim(T1) (component-wise) |
| 176 | * vecN(in0.x * in1, ...) if dim(T1) == 1 (vector by scalar) |
| 177 | * vecN(in0 * in1.x, ...) if dim(T0) == 1 (scalar by vector) |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 178 | */ |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 179 | template <typename T0, typename T1> |
| 180 | static Self Mul(T0 in0, T1 in1); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 181 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 182 | /** Returns a GLSL addition: component-wise or add a scalar to each component. |
| 183 | * Return value computes: |
| 184 | * vecN(in0.x + in1.x, ...) or vecN(in0.x + in1, ...) or vecN(in0 + in1.x, ...). |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 185 | */ |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 186 | template <typename T0, typename T1> |
| 187 | static Self Add(T0 in0, T1 in1); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 188 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 189 | /** Returns a GLSL subtraction: component-wise or subtract compoments by a scalar. |
| 190 | * Return value computes |
| 191 | * vecN(in0.x - in1.x, ...) or vecN(in0.x - in1, ...) or vecN(in0 - in1.x, ...). |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 192 | */ |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 193 | template <typename T0, typename T1> |
| 194 | static Self Sub(T0 in0, T1 in1); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 195 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 196 | /** Returns expression that accesses component(s) of the expression. |
| 197 | * format should be the form "%s.x" where 'x' is the component(s) to access. |
| 198 | * Caller is responsible for making sure the amount of components in the |
| 199 | * format string is equal to dim(T). |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 200 | */ |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 201 | template <typename T> |
| 202 | T extractComponents(const char format[]) const; |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 203 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 204 | private: |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 205 | enum ExprType { |
| 206 | kZeros_ExprType, |
| 207 | kOnes_ExprType, |
| 208 | kFullExpr_ExprType, |
| 209 | }; |
| 210 | ExprType fType; |
| 211 | SkString fExpr; |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 212 | }; |
| 213 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 214 | class GrGLSLExpr1; |
| 215 | class GrGLSLExpr4; |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 216 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 217 | /** Class representing a float GLSL expression. */ |
| 218 | class GrGLSLExpr1 : public GrGLSLExpr<GrGLSLExpr1> { |
| 219 | public: |
| 220 | GrGLSLExpr1() |
| 221 | : INHERITED() { |
| 222 | } |
| 223 | explicit GrGLSLExpr1(int v) |
| 224 | : INHERITED(v) { |
| 225 | } |
| 226 | GrGLSLExpr1(const char* expr) |
| 227 | : INHERITED(expr) { |
| 228 | } |
| 229 | GrGLSLExpr1(const SkString& expr) |
| 230 | : INHERITED(expr) { |
| 231 | } |
tomhudson@google.com | 168e634 | 2012-04-18 17:49:20 +0000 | [diff] [blame] | 232 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 233 | static GrGLSLExpr1 VectorCast(const GrGLSLExpr1& expr); |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 234 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 235 | private: |
| 236 | GrGLSLExpr1(const char format[], const char in0[]) |
| 237 | : INHERITED(format, in0) { |
| 238 | } |
| 239 | GrGLSLExpr1(const char format[], const char in0[], const char in1[]) |
| 240 | : INHERITED(format, in0, in1) { |
| 241 | } |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 242 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 243 | static const char* ZerosStr(); |
| 244 | static const char* OnesStr(); |
| 245 | static const char* CastStr(); |
| 246 | static const char* CastIntStr(); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 247 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 248 | friend GrGLSLExpr1 operator*(const GrGLSLExpr1& in0, const GrGLSLExpr1&in1); |
| 249 | friend GrGLSLExpr1 operator+(const GrGLSLExpr1& in0, const GrGLSLExpr1&in1); |
| 250 | friend GrGLSLExpr1 operator-(const GrGLSLExpr1& in0, const GrGLSLExpr1&in1); |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 251 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 252 | friend class GrGLSLExpr<GrGLSLExpr1>; |
| 253 | friend class GrGLSLExpr<GrGLSLExpr4>; |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 254 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 255 | typedef GrGLSLExpr<GrGLSLExpr1> INHERITED; |
| 256 | }; |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 257 | |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 258 | /** Class representing a float vector (vec4) GLSL expression. */ |
| 259 | class GrGLSLExpr4 : public GrGLSLExpr<GrGLSLExpr4> { |
| 260 | public: |
| 261 | GrGLSLExpr4() |
| 262 | : INHERITED() { |
| 263 | } |
| 264 | explicit GrGLSLExpr4(int v) |
| 265 | : INHERITED(v) { |
| 266 | } |
| 267 | GrGLSLExpr4(const char* expr) |
| 268 | : INHERITED(expr) { |
| 269 | } |
| 270 | GrGLSLExpr4(const SkString& expr) |
| 271 | : INHERITED(expr) { |
| 272 | } |
| 273 | |
| 274 | typedef GrGLSLExpr1 AExpr; |
| 275 | AExpr a() const; |
| 276 | |
| 277 | /** GLSL vec4 cast / constructor, eg vec4(floatv) -> vec4(floatv, floatv, floatv, floatv) */ |
| 278 | static GrGLSLExpr4 VectorCast(const GrGLSLExpr1& expr); |
| 279 | static GrGLSLExpr4 VectorCast(const GrGLSLExpr4& expr); |
| 280 | |
| 281 | private: |
| 282 | GrGLSLExpr4(const char format[], const char in0[]) |
| 283 | : INHERITED(format, in0) { |
| 284 | } |
| 285 | GrGLSLExpr4(const char format[], const char in0[], const char in1[]) |
| 286 | : INHERITED(format, in0, in1) { |
| 287 | } |
| 288 | |
| 289 | static const char* ZerosStr(); |
| 290 | static const char* OnesStr(); |
| 291 | static const char* CastStr(); |
| 292 | static const char* CastIntStr(); |
| 293 | |
| 294 | // The vector-by-scalar and scalar-by-vector binary operations. |
| 295 | friend GrGLSLExpr4 operator*(const GrGLSLExpr1& in0, const GrGLSLExpr4&in1); |
| 296 | friend GrGLSLExpr4 operator+(const GrGLSLExpr1& in0, const GrGLSLExpr4&in1); |
| 297 | friend GrGLSLExpr4 operator-(const GrGLSLExpr1& in0, const GrGLSLExpr4&in1); |
| 298 | friend GrGLSLExpr4 operator*(const GrGLSLExpr4& in0, const GrGLSLExpr1&in1); |
| 299 | friend GrGLSLExpr4 operator+(const GrGLSLExpr4& in0, const GrGLSLExpr1&in1); |
| 300 | friend GrGLSLExpr4 operator-(const GrGLSLExpr4& in0, const GrGLSLExpr1&in1); |
| 301 | |
| 302 | // The vector-by-vector, i.e. component-wise, binary operations. |
| 303 | friend GrGLSLExpr4 operator*(const GrGLSLExpr4& in0, const GrGLSLExpr4&in1); |
| 304 | friend GrGLSLExpr4 operator+(const GrGLSLExpr4& in0, const GrGLSLExpr4&in1); |
| 305 | friend GrGLSLExpr4 operator-(const GrGLSLExpr4& in0, const GrGLSLExpr4&in1); |
| 306 | |
| 307 | friend class GrGLSLExpr<GrGLSLExpr4>; |
| 308 | |
| 309 | typedef GrGLSLExpr<GrGLSLExpr4> INHERITED; |
| 310 | }; |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 311 | |
| 312 | /** |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 313 | * Does an inplace mul, *=, of vec4VarName by mulFactor. |
| 314 | * A semicolon and newline are added after the assignment. |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 315 | */ |
commit-bot@chromium.org | 824c346 | 2013-10-10 06:30:18 +0000 | [diff] [blame] | 316 | void GrGLSLMulVarBy4f(SkString* outAppend, unsigned tabCnt, |
commit-bot@chromium.org | a34995e | 2013-10-23 05:42:03 +0000 | [diff] [blame] | 317 | const char* vec4VarName, const GrGLSLExpr4& mulFactor); |
bsalomon@google.com | 018f179 | 2013-04-18 19:36:09 +0000 | [diff] [blame] | 318 | |
| 319 | #include "GrGLSL_impl.h" |
bsalomon@google.com | 4af0af6 | 2012-08-29 12:59:57 +0000 | [diff] [blame] | 320 | |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 321 | #endif |