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