Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/sksl/ir/SkSLType.h

Issue 2143323003: Revert of SkSL performance improvements (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/sksl/ir/SkSLSymbolTable.cpp ('k') | src/sksl/ir/SkSLType.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SKIASL_TYPE 8 #ifndef SKIASL_TYPE
9 #define SKIASL_TYPE 9 #define SKIASL_TYPE
10 10
11 #include "SkSLModifiers.h" 11 #include "SkSLModifiers.h"
12 #include "SkSLSymbol.h" 12 #include "SkSLSymbol.h"
13 #include "../SkSLPosition.h" 13 #include "../SkSLPosition.h"
14 #include "../SkSLUtil.h" 14 #include "../SkSLUtil.h"
15 #include "../spirv.h" 15 #include "../spirv.h"
16 #include <vector> 16 #include <vector>
17 #include <memory> 17 #include <memory>
18 18
19 namespace SkSL { 19 namespace SkSL {
20 20
21 /** 21 /**
22 * Represents a type, such as int or vec4. 22 * Represents a type, such as int or vec4.
23 */ 23 */
24 class Type : public Symbol { 24 class Type : public Symbol {
25 public: 25 public:
26 struct Field { 26 struct Field {
27 Field(Modifiers modifiers, std::string name, const Type& type) 27 Field(Modifiers modifiers, std::string name, std::shared_ptr<Type> type)
28 : fModifiers(modifiers) 28 : fModifiers(modifiers)
29 , fName(std::move(name)) 29 , fName(std::move(name))
30 , fType(std::move(type)) {} 30 , fType(std::move(type)) {}
31 31
32 const std::string description() const { 32 const std::string description() {
33 return fType.description() + " " + fName + ";"; 33 return fType->description() + " " + fName + ";";
34 } 34 }
35 35
36 const Modifiers fModifiers; 36 const Modifiers fModifiers;
37 const std::string fName; 37 const std::string fName;
38 const Type& fType; 38 const std::shared_ptr<Type> fType;
39 }; 39 };
40 40
41 enum Kind { 41 enum Kind {
42 kScalar_Kind, 42 kScalar_Kind,
43 kVector_Kind, 43 kVector_Kind,
44 kMatrix_Kind, 44 kMatrix_Kind,
45 kArray_Kind, 45 kArray_Kind,
46 kStruct_Kind, 46 kStruct_Kind,
47 kGeneric_Kind, 47 kGeneric_Kind,
48 kSampler_Kind, 48 kSampler_Kind,
49 kOther_Kind 49 kOther_Kind
50 }; 50 };
51 51
52 // Create an "other" (special) type with the given name. These types cannot be directly 52 // Create an "other" (special) type with the given name. These types cannot be directly
53 // referenced from user code. 53 // referenced from user code.
54 Type(std::string name) 54 Type(std::string name)
55 : INHERITED(Position(), kType_Kind, std::move(name)) 55 : INHERITED(Position(), kType_Kind, std::move(name))
56 , fTypeKind(kOther_Kind) {} 56 , fTypeKind(kOther_Kind) {}
57 57
58 // Create a generic type which maps to the listed types. 58 // Create a generic type which maps to the listed types.
59 Type(std::string name, std::vector<const Type*> types) 59 Type(std::string name, std::vector<std::shared_ptr<Type>> types)
60 : INHERITED(Position(), kType_Kind, std::move(name)) 60 : INHERITED(Position(), kType_Kind, std::move(name))
61 , fTypeKind(kGeneric_Kind) 61 , fTypeKind(kGeneric_Kind)
62 , fCoercibleTypes(std::move(types)) { 62 , fCoercibleTypes(std::move(types)) {
63 ASSERT(fCoercibleTypes.size() == 4); 63 ASSERT(fCoercibleTypes.size() == 4);
64 } 64 }
65 65
66 // Create a struct type with the given fields. 66 // Create a struct type with the given fields.
67 Type(std::string name, std::vector<Field> fields) 67 Type(std::string name, std::vector<Field> fields)
68 : INHERITED(Position(), kType_Kind, std::move(name)) 68 : INHERITED(Position(), kType_Kind, std::move(name))
69 , fTypeKind(kStruct_Kind) 69 , fTypeKind(kStruct_Kind)
70 , fFields(std::move(fields)) {} 70 , fFields(std::move(fields)) {}
71 71
72 // Create a scalar type. 72 // Create a scalar type.
73 Type(std::string name, bool isNumber) 73 Type(std::string name, bool isNumber)
74 : INHERITED(Position(), kType_Kind, std::move(name)) 74 : INHERITED(Position(), kType_Kind, std::move(name))
75 , fTypeKind(kScalar_Kind) 75 , fTypeKind(kScalar_Kind)
76 , fIsNumber(isNumber) 76 , fIsNumber(isNumber)
77 , fColumns(1) 77 , fColumns(1)
78 , fRows(1) {} 78 , fRows(1) {}
79 79
80 // Create a scalar type which can be coerced to the listed types. 80 // Create a scalar type which can be coerced to the listed types.
81 Type(std::string name, bool isNumber, std::vector<const Type*> coercibleType s) 81 Type(std::string name, bool isNumber, std::vector<std::shared_ptr<Type>> coe rcibleTypes)
82 : INHERITED(Position(), kType_Kind, std::move(name)) 82 : INHERITED(Position(), kType_Kind, std::move(name))
83 , fTypeKind(kScalar_Kind) 83 , fTypeKind(kScalar_Kind)
84 , fIsNumber(isNumber) 84 , fIsNumber(isNumber)
85 , fCoercibleTypes(std::move(coercibleTypes)) 85 , fCoercibleTypes(std::move(coercibleTypes))
86 , fColumns(1) 86 , fColumns(1)
87 , fRows(1) {} 87 , fRows(1) {}
88 88
89 // Create a vector type. 89 // Create a vector type.
90 Type(std::string name, const Type& componentType, int columns) 90 Type(std::string name, std::shared_ptr<Type> componentType, int columns)
91 : Type(name, kVector_Kind, componentType, columns) {} 91 : Type(name, kVector_Kind, componentType, columns) {}
92 92
93 // Create a vector or array type. 93 // Create a vector or array type.
94 Type(std::string name, Kind kind, const Type& componentType, int columns) 94 Type(std::string name, Kind kind, std::shared_ptr<Type> componentType, int c olumns)
95 : INHERITED(Position(), kType_Kind, std::move(name)) 95 : INHERITED(Position(), kType_Kind, std::move(name))
96 , fTypeKind(kind) 96 , fTypeKind(kind)
97 , fComponentType(&componentType) 97 , fComponentType(std::move(componentType))
98 , fColumns(columns) 98 , fColumns(columns)
99 , fRows(1) 99 , fRows(1)
100 , fDimensions(SpvDim1D) {} 100 , fDimensions(SpvDim1D) {}
101 101
102 // Create a matrix type. 102 // Create a matrix type.
103 Type(std::string name, const Type& componentType, int columns, int rows) 103 Type(std::string name, std::shared_ptr<Type> componentType, int columns, int rows)
104 : INHERITED(Position(), kType_Kind, std::move(name)) 104 : INHERITED(Position(), kType_Kind, std::move(name))
105 , fTypeKind(kMatrix_Kind) 105 , fTypeKind(kMatrix_Kind)
106 , fComponentType(&componentType) 106 , fComponentType(std::move(componentType))
107 , fColumns(columns) 107 , fColumns(columns)
108 , fRows(rows) 108 , fRows(rows)
109 , fDimensions(SpvDim1D) {} 109 , fDimensions(SpvDim1D) {}
110 110
111 // Create a sampler type. 111 // Create a sampler type.
112 Type(std::string name, SpvDim_ dimensions, bool isDepth, bool isArrayed, boo l isMultisampled, 112 Type(std::string name, SpvDim_ dimensions, bool isDepth, bool isArrayed, boo l isMultisampled,
113 bool isSampled) 113 bool isSampled)
114 : INHERITED(Position(), kType_Kind, std::move(name)) 114 : INHERITED(Position(), kType_Kind, std::move(name))
115 , fTypeKind(kSampler_Kind) 115 , fTypeKind(kSampler_Kind)
116 , fDimensions(dimensions) 116 , fDimensions(dimensions)
(...skipping 29 matching lines...) Expand all
146 * Returns true if this is a numeric scalar type. 146 * Returns true if this is a numeric scalar type.
147 */ 147 */
148 bool isNumber() const { 148 bool isNumber() const {
149 return fIsNumber; 149 return fIsNumber;
150 } 150 }
151 151
152 /** 152 /**
153 * Returns true if an instance of this type can be freely coerced (implicitl y converted) to 153 * Returns true if an instance of this type can be freely coerced (implicitl y converted) to
154 * another type. 154 * another type.
155 */ 155 */
156 bool canCoerceTo(const Type& other) const { 156 bool canCoerceTo(std::shared_ptr<Type> other) const {
157 int cost; 157 int cost;
158 return determineCoercionCost(other, &cost); 158 return determineCoercionCost(other, &cost);
159 } 159 }
160 160
161 /** 161 /**
162 * Determines the "cost" of coercing (implicitly converting) this type to an other type. The cost 162 * Determines the "cost" of coercing (implicitly converting) this type to an other type. The cost
163 * is a number with no particular meaning other than that lower costs are pr eferable to higher 163 * is a number with no particular meaning other than that lower costs are pr eferable to higher
164 * costs. Returns true if a conversion is possible, false otherwise. The val ue of the out 164 * costs. Returns true if a conversion is possible, false otherwise. The val ue of the out
165 * parameter is undefined if false is returned. 165 * parameter is undefined if false is returned.
166 */ 166 */
167 bool determineCoercionCost(const Type& other, int* outCost) const; 167 bool determineCoercionCost(std::shared_ptr<Type> other, int* outCost) const;
168 168
169 /** 169 /**
170 * For matrices and vectors, returns the type of individual cells (e.g. mat2 has a component 170 * For matrices and vectors, returns the type of individual cells (e.g. mat2 has a component
171 * type of kFloat_Type). For all other types, causes an assertion failure. 171 * type of kFloat_Type). For all other types, causes an assertion failure.
172 */ 172 */
173 const Type& componentType() const { 173 std::shared_ptr<Type> componentType() const {
174 ASSERT(fComponentType); 174 ASSERT(fComponentType);
175 return *fComponentType; 175 return fComponentType;
176 } 176 }
177 177
178 /** 178 /**
179 * For matrices and vectors, returns the number of columns (e.g. both mat3 a nd vec3 return 3). 179 * For matrices and vectors, returns the number of columns (e.g. both mat3 a nd vec3 return 3).
180 * For scalars, returns 1. For arrays, returns either the size of the array (if known) or -1. 180 * For scalars, returns 1. For arrays, returns either the size of the array (if known) or -1.
181 * For all other types, causes an assertion failure. 181 * For all other types, causes an assertion failure.
182 */ 182 */
183 int columns() const { 183 int columns() const {
184 ASSERT(fTypeKind == kScalar_Kind || fTypeKind == kVector_Kind || 184 ASSERT(fTypeKind == kScalar_Kind || fTypeKind == kVector_Kind ||
185 fTypeKind == kMatrix_Kind || fTypeKind == kArray_Kind); 185 fTypeKind == kMatrix_Kind || fTypeKind == kArray_Kind);
186 return fColumns; 186 return fColumns;
187 } 187 }
188 188
189 /** 189 /**
190 * For matrices, returns the number of rows (e.g. mat2x4 returns 4). For vec tors and scalars, 190 * For matrices, returns the number of rows (e.g. mat2x4 returns 4). For vec tors and scalars,
191 * returns 1. For all other types, causes an assertion failure. 191 * returns 1. For all other types, causes an assertion failure.
192 */ 192 */
193 int rows() const { 193 int rows() const {
194 ASSERT(fRows > 0); 194 ASSERT(fRows > 0);
195 return fRows; 195 return fRows;
196 } 196 }
197 197
198 const std::vector<Field>& fields() const { 198 std::vector<Field> fields() const {
199 ASSERT(fTypeKind == kStruct_Kind); 199 ASSERT(fTypeKind == kStruct_Kind);
200 return fFields; 200 return fFields;
201 } 201 }
202 202
203 /** 203 /**
204 * For generic types, returns the types that this generic type can substitut e for. For other 204 * For generic types, returns the types that this generic type can substitut e for. For other
205 * types, returns a list of other types that this type can be coerced into. 205 * types, returns a list of other types that this type can be coerced into.
206 */ 206 */
207 const std::vector<const Type*>& coercibleTypes() const { 207 std::vector<std::shared_ptr<Type>> coercibleTypes() const {
208 ASSERT(fCoercibleTypes.size() > 0); 208 ASSERT(fCoercibleTypes.size() > 0);
209 return fCoercibleTypes; 209 return fCoercibleTypes;
210 } 210 }
211 211
212 int dimensions() const { 212 int dimensions() const {
213 ASSERT(fTypeKind == kSampler_Kind); 213 ASSERT(fTypeKind == kSampler_Kind);
214 return fDimensions; 214 return fDimensions;
215 } 215 }
216 216
217 bool isDepth() const { 217 bool isDepth() const {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 case kVector_Kind: 250 case kVector_Kind:
251 return vector_alignment(fComponentType->size(), fColumns); 251 return vector_alignment(fComponentType->size(), fColumns);
252 case kMatrix_Kind: 252 case kMatrix_Kind:
253 return (vector_alignment(fComponentType->size(), fRows) + 15) & ~15; 253 return (vector_alignment(fComponentType->size(), fRows) + 15) & ~15;
254 case kArray_Kind: 254 case kArray_Kind:
255 // round up to next multiple of 16 255 // round up to next multiple of 16
256 return (fComponentType->alignment() + 15) & ~15; 256 return (fComponentType->alignment() + 15) & ~15;
257 case kStruct_Kind: { 257 case kStruct_Kind: {
258 size_t result = 16; 258 size_t result = 16;
259 for (size_t i = 0; i < fFields.size(); i++) { 259 for (size_t i = 0; i < fFields.size(); i++) {
260 size_t alignment = fFields[i].fType.alignment(); 260 size_t alignment = fFields[i].fType->alignment();
261 if (alignment > result) { 261 if (alignment > result) {
262 result = alignment; 262 result = alignment;
263 } 263 }
264 } 264 }
265 } 265 }
266 default: 266 default:
267 ABORT(("cannot determine size of type " + fName).c_str()); 267 ABORT(("cannot determine size of type " + fName).c_str());
268 } 268 }
269 } 269 }
270 270
(...skipping 22 matching lines...) Expand all
293 return 4; 293 return 4;
294 case kVector_Kind: 294 case kVector_Kind:
295 return fColumns * fComponentType->size(); 295 return fColumns * fComponentType->size();
296 case kMatrix_Kind: 296 case kMatrix_Kind:
297 return vector_alignment(fComponentType->size(), fRows) * fColumn s; 297 return vector_alignment(fComponentType->size(), fRows) * fColumn s;
298 case kArray_Kind: 298 case kArray_Kind:
299 return fColumns * this->stride(); 299 return fColumns * this->stride();
300 case kStruct_Kind: { 300 case kStruct_Kind: {
301 size_t total = 0; 301 size_t total = 0;
302 for (size_t i = 0; i < fFields.size(); i++) { 302 for (size_t i = 0; i < fFields.size(); i++) {
303 size_t alignment = fFields[i].fType.alignment(); 303 size_t alignment = fFields[i].fType->alignment();
304 if (total % alignment != 0) { 304 if (total % alignment != 0) {
305 total += alignment - total % alignment; 305 total += alignment - total % alignment;
306 } 306 }
307 ASSERT(false); 307 ASSERT(false);
308 ASSERT(total % alignment == 0); 308 ASSERT(total % alignment == 0);
309 total += fFields[i].fType.size(); 309 total += fFields[i].fType->size();
310 } 310 }
311 return total; 311 return total;
312 } 312 }
313 default: 313 default:
314 ABORT(("cannot determine size of type " + fName).c_str()); 314 ABORT(("cannot determine size of type " + fName).c_str());
315 } 315 }
316 } 316 }
317 317
318 /** 318 /**
319 * Returns the corresponding vector or matrix type with the specified number of columns and 319 * Returns the corresponding vector or matrix type with the specified number of columns and
320 * rows. 320 * rows.
321 */ 321 */
322 const Type& toCompound(int columns, int rows) const; 322 std::shared_ptr<Type> toCompound(int columns, int rows);
323 323
324 private: 324 private:
325 typedef Symbol INHERITED; 325 typedef Symbol INHERITED;
326 326
327 const Kind fTypeKind; 327 const Kind fTypeKind;
328 const bool fIsNumber = false; 328 const bool fIsNumber = false;
329 const Type* fComponentType = nullptr; 329 const std::shared_ptr<Type> fComponentType = nullptr;
330 const std::vector<const Type*> fCoercibleTypes = { }; 330 const std::vector<std::shared_ptr<Type>> fCoercibleTypes = { };
331 const int fColumns = -1; 331 const int fColumns = -1;
332 const int fRows = -1; 332 const int fRows = -1;
333 const std::vector<Field> fFields = { }; 333 const std::vector<Field> fFields = { };
334 const SpvDim_ fDimensions = SpvDim1D; 334 const SpvDim_ fDimensions = SpvDim1D;
335 const bool fIsDepth = false; 335 const bool fIsDepth = false;
336 const bool fIsArrayed = false; 336 const bool fIsArrayed = false;
337 const bool fIsMultisampled = false; 337 const bool fIsMultisampled = false;
338 const bool fIsSampled = false; 338 const bool fIsSampled = false;
339 }; 339 };
340 340
341 extern const Type* kVoid_Type; 341 extern const std::shared_ptr<Type> kVoid_Type;
342 342
343 extern const Type* kFloat_Type; 343 extern const std::shared_ptr<Type> kFloat_Type;
344 extern const Type* kVec2_Type; 344 extern const std::shared_ptr<Type> kVec2_Type;
345 extern const Type* kVec3_Type; 345 extern const std::shared_ptr<Type> kVec3_Type;
346 extern const Type* kVec4_Type; 346 extern const std::shared_ptr<Type> kVec4_Type;
347 extern const Type* kDouble_Type; 347 extern const std::shared_ptr<Type> kDouble_Type;
348 extern const Type* kDVec2_Type; 348 extern const std::shared_ptr<Type> kDVec2_Type;
349 extern const Type* kDVec3_Type; 349 extern const std::shared_ptr<Type> kDVec3_Type;
350 extern const Type* kDVec4_Type; 350 extern const std::shared_ptr<Type> kDVec4_Type;
351 extern const Type* kInt_Type; 351 extern const std::shared_ptr<Type> kInt_Type;
352 extern const Type* kIVec2_Type; 352 extern const std::shared_ptr<Type> kIVec2_Type;
353 extern const Type* kIVec3_Type; 353 extern const std::shared_ptr<Type> kIVec3_Type;
354 extern const Type* kIVec4_Type; 354 extern const std::shared_ptr<Type> kIVec4_Type;
355 extern const Type* kUInt_Type; 355 extern const std::shared_ptr<Type> kUInt_Type;
356 extern const Type* kUVec2_Type; 356 extern const std::shared_ptr<Type> kUVec2_Type;
357 extern const Type* kUVec3_Type; 357 extern const std::shared_ptr<Type> kUVec3_Type;
358 extern const Type* kUVec4_Type; 358 extern const std::shared_ptr<Type> kUVec4_Type;
359 extern const Type* kBool_Type; 359 extern const std::shared_ptr<Type> kBool_Type;
360 extern const Type* kBVec2_Type; 360 extern const std::shared_ptr<Type> kBVec2_Type;
361 extern const Type* kBVec3_Type; 361 extern const std::shared_ptr<Type> kBVec3_Type;
362 extern const Type* kBVec4_Type; 362 extern const std::shared_ptr<Type> kBVec4_Type;
363 363
364 extern const Type* kMat2x2_Type; 364 extern const std::shared_ptr<Type> kMat2x2_Type;
365 extern const Type* kMat2x3_Type; 365 extern const std::shared_ptr<Type> kMat2x3_Type;
366 extern const Type* kMat2x4_Type; 366 extern const std::shared_ptr<Type> kMat2x4_Type;
367 extern const Type* kMat3x2_Type; 367 extern const std::shared_ptr<Type> kMat3x2_Type;
368 extern const Type* kMat3x3_Type; 368 extern const std::shared_ptr<Type> kMat3x3_Type;
369 extern const Type* kMat3x4_Type; 369 extern const std::shared_ptr<Type> kMat3x4_Type;
370 extern const Type* kMat4x2_Type; 370 extern const std::shared_ptr<Type> kMat4x2_Type;
371 extern const Type* kMat4x3_Type; 371 extern const std::shared_ptr<Type> kMat4x3_Type;
372 extern const Type* kMat4x4_Type; 372 extern const std::shared_ptr<Type> kMat4x4_Type;
373 373
374 extern const Type* kDMat2x2_Type; 374 extern const std::shared_ptr<Type> kDMat2x2_Type;
375 extern const Type* kDMat2x3_Type; 375 extern const std::shared_ptr<Type> kDMat2x3_Type;
376 extern const Type* kDMat2x4_Type; 376 extern const std::shared_ptr<Type> kDMat2x4_Type;
377 extern const Type* kDMat3x2_Type; 377 extern const std::shared_ptr<Type> kDMat3x2_Type;
378 extern const Type* kDMat3x3_Type; 378 extern const std::shared_ptr<Type> kDMat3x3_Type;
379 extern const Type* kDMat3x4_Type; 379 extern const std::shared_ptr<Type> kDMat3x4_Type;
380 extern const Type* kDMat4x2_Type; 380 extern const std::shared_ptr<Type> kDMat4x2_Type;
381 extern const Type* kDMat4x3_Type; 381 extern const std::shared_ptr<Type> kDMat4x3_Type;
382 extern const Type* kDMat4x4_Type; 382 extern const std::shared_ptr<Type> kDMat4x4_Type;
383 383
384 extern const Type* kSampler1D_Type; 384 extern const std::shared_ptr<Type> kSampler1D_Type;
385 extern const Type* kSampler2D_Type; 385 extern const std::shared_ptr<Type> kSampler2D_Type;
386 extern const Type* kSampler3D_Type; 386 extern const std::shared_ptr<Type> kSampler3D_Type;
387 extern const Type* kSamplerCube_Type; 387 extern const std::shared_ptr<Type> kSamplerCube_Type;
388 extern const Type* kSampler2DRect_Type; 388 extern const std::shared_ptr<Type> kSampler2DRect_Type;
389 extern const Type* kSampler1DArray_Type; 389 extern const std::shared_ptr<Type> kSampler1DArray_Type;
390 extern const Type* kSampler2DArray_Type; 390 extern const std::shared_ptr<Type> kSampler2DArray_Type;
391 extern const Type* kSamplerCubeArray_Type; 391 extern const std::shared_ptr<Type> kSamplerCubeArray_Type;
392 extern const Type* kSamplerBuffer_Type; 392 extern const std::shared_ptr<Type> kSamplerBuffer_Type;
393 extern const Type* kSampler2DMS_Type; 393 extern const std::shared_ptr<Type> kSampler2DMS_Type;
394 extern const Type* kSampler2DMSArray_Type; 394 extern const std::shared_ptr<Type> kSampler2DMSArray_Type;
395 395
396 extern const Type* kGSampler1D_Type; 396 extern const std::shared_ptr<Type> kGSampler1D_Type;
397 extern const Type* kGSampler2D_Type; 397 extern const std::shared_ptr<Type> kGSampler2D_Type;
398 extern const Type* kGSampler3D_Type; 398 extern const std::shared_ptr<Type> kGSampler3D_Type;
399 extern const Type* kGSamplerCube_Type; 399 extern const std::shared_ptr<Type> kGSamplerCube_Type;
400 extern const Type* kGSampler2DRect_Type; 400 extern const std::shared_ptr<Type> kGSampler2DRect_Type;
401 extern const Type* kGSampler1DArray_Type; 401 extern const std::shared_ptr<Type> kGSampler1DArray_Type;
402 extern const Type* kGSampler2DArray_Type; 402 extern const std::shared_ptr<Type> kGSampler2DArray_Type;
403 extern const Type* kGSamplerCubeArray_Type; 403 extern const std::shared_ptr<Type> kGSamplerCubeArray_Type;
404 extern const Type* kGSamplerBuffer_Type; 404 extern const std::shared_ptr<Type> kGSamplerBuffer_Type;
405 extern const Type* kGSampler2DMS_Type; 405 extern const std::shared_ptr<Type> kGSampler2DMS_Type;
406 extern const Type* kGSampler2DMSArray_Type; 406 extern const std::shared_ptr<Type> kGSampler2DMSArray_Type;
407 407
408 extern const Type* kSampler1DShadow_Type; 408 extern const std::shared_ptr<Type> kSampler1DShadow_Type;
409 extern const Type* kSampler2DShadow_Type; 409 extern const std::shared_ptr<Type> kSampler2DShadow_Type;
410 extern const Type* kSamplerCubeShadow_Type; 410 extern const std::shared_ptr<Type> kSamplerCubeShadow_Type;
411 extern const Type* kSampler2DRectShadow_Type; 411 extern const std::shared_ptr<Type> kSampler2DRectShadow_Type;
412 extern const Type* kSampler1DArrayShadow_Type; 412 extern const std::shared_ptr<Type> kSampler1DArrayShadow_Type;
413 extern const Type* kSampler2DArrayShadow_Type; 413 extern const std::shared_ptr<Type> kSampler2DArrayShadow_Type;
414 extern const Type* kSamplerCubeArrayShadow_Type; 414 extern const std::shared_ptr<Type> kSamplerCubeArrayShadow_Type;
415 extern const Type* kGSampler2DArrayShadow_Type; 415 extern const std::shared_ptr<Type> kGSampler2DArrayShadow_Type;
416 extern const Type* kGSamplerCubeArrayShadow_Type; 416 extern const std::shared_ptr<Type> kGSamplerCubeArrayShadow_Type;
417 417
418 extern const Type* kGenType_Type; 418 extern const std::shared_ptr<Type> kGenType_Type;
419 extern const Type* kGenDType_Type; 419 extern const std::shared_ptr<Type> kGenDType_Type;
420 extern const Type* kGenIType_Type; 420 extern const std::shared_ptr<Type> kGenIType_Type;
421 extern const Type* kGenUType_Type; 421 extern const std::shared_ptr<Type> kGenUType_Type;
422 extern const Type* kGenBType_Type; 422 extern const std::shared_ptr<Type> kGenBType_Type;
423 extern const Type* kMat_Type; 423 extern const std::shared_ptr<Type> kMat_Type;
424 extern const Type* kVec_Type; 424 extern const std::shared_ptr<Type> kVec_Type;
425 extern const Type* kGVec_Type; 425 extern const std::shared_ptr<Type> kGVec_Type;
426 extern const Type* kGVec2_Type; 426 extern const std::shared_ptr<Type> kGVec2_Type;
427 extern const Type* kGVec3_Type; 427 extern const std::shared_ptr<Type> kGVec3_Type;
428 extern const Type* kGVec4_Type; 428 extern const std::shared_ptr<Type> kGVec4_Type;
429 extern const Type* kDVec_Type; 429 extern const std::shared_ptr<Type> kDVec_Type;
430 extern const Type* kIVec_Type; 430 extern const std::shared_ptr<Type> kIVec_Type;
431 extern const Type* kUVec_Type; 431 extern const std::shared_ptr<Type> kUVec_Type;
432 extern const Type* kBVec_Type; 432 extern const std::shared_ptr<Type> kBVec_Type;
433 433
434 extern const Type* kInvalid_Type; 434 extern const std::shared_ptr<Type> kInvalid_Type;
435 435
436 } // namespace 436 } // namespace
437 437
438 #endif 438 #endif
OLDNEW
« no previous file with comments | « src/sksl/ir/SkSLSymbolTable.cpp ('k') | src/sksl/ir/SkSLType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698