CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
ASTEnums.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
11
16
18
20 class Token;
21
22 // Assignment operator enumeration:
23 // =, +=, -=, *=, /=, %=, <<=, >>=, |= , &=, ^=
24 enum class AssignOp {
26
27 Set,
28 // =
29 Add,
30 // +=
31 Sub,
32 // -=
33 Mul,
34 // *=
35 Div,
36 // /=
37 Mod,
38 // %=
39 LShift,
40 // <<=
41 RShift,
42 // >>=
43 Or,
44 // |=
45 And,
46 // &=
47 Xor,
48 // ^=
49 };
50
53
54 bool isBitwiseOp(const AssignOp o);
55
56 // Binary operator enumeration:
57 // &&, ||, |, ^, &, <<, >>, +, -, *, /, %, ==, !=, <, >, <=, >=
58 enum class BinaryOp {
60
62 // &&
64 // ||
65 Or,
66 // |
67 Xor,
68 // ^
69 And,
70 // &
71 LShift,
72 // <<
73 RShift,
74 // >>
75 Add,
76 // +
77 Sub,
78 // -
79 Mul,
80 // *
81 Div,
82 // /
83 Mod,
84 // %
85 Equal,
86 // ==
88 // !=
89 Less,
90 // <
91 Greater,
92 // >
94 // <=
96 // >=
97 };
98
101
102 // Converts the specified assignment operator to an equivalent binary operator, or returns BinaryOp::Undefined if no conversion is possible.
104
105 // Returns true if the specified binary operator is a logical operator (&&, ||).
106 bool isLogicalOp(const BinaryOp o);
107
108 // Returns true if the specified binary operator is a bitwise operator (|, ^, &, <<, >>).
109 bool isBitwiseOp(const BinaryOp o);
110
111 // Returns true if the specified binary operator is a comparison operator (==, !=, <, >, <=, >=).
112 bool isCompareOp(const BinaryOp o);
113
114 // Returns true if the specified binary operator is a boolean operator, i.e. either logical or compare operator.
115 bool isBooleanOp(const BinaryOp o);
116
117 // Unary operator enumeration:
118 // !, ~, +, -, ++, --
119 enum class UnaryOp {
120 Undefined,
121
123 // Logical not (e.g. !x)
124 Not,
125 // Bitwise not (e.g. ~x)
126 Nop,
127 // No-op (e.g. +x is equal to x)
128 Negate,
129 // Negate (e.g. -x)
130 Inc,
131 // Increment (e.g. ++x)
132 Dec,
133 // Decrement (e.g. --x)
134 };
135
138
139 bool isLogicalOp(const UnaryOp o);
140 bool isBitwiseOp(const UnaryOp o);
141
142 // Returns true if the specified unary operator is only for l-values (e.g. ++x or --x).
143 bool isLValueOp(const UnaryOp o);
144
145 // Control transfer enumeration:
146 // break, continue, discard
147 enum class CtrlTransfer {
148 Undefined,
149
150 Break,
151 Continue,
152 Discard,
153 };
154
157
158 // Base data type enumeration.
159 enum class DataType {
160 Undefined,
161
162 // MARK: String types
163 // HLSL GLSL
164 // -----------------------------------------------------------------------------------------
165 String,
166 // string n/a
167
168 // MARK: Scalar types
169 // HLSL GLSL
170 // -----------------------------------------------------------------------------------------
171 Bool,
172 // bool bool
173 Int,
174 // int int
175 UInt,
176 // uint uint
177 Half,
178 // half float
179 Float,
180 // float float
181 Double,
182 // double double
183
184 // MARK: Vector types
185 // HLSL GLSL
186 // -----------------------------------------------------------------------------------------
187 Bool2,
188 // bool2 bvec2
189 Bool3,
190 // bool3 bvec3
191 Bool4,
192 // bool4 bvec4
193 Int2,
194 // int2 ivec2
195 Int3,
196 // int3 ivec3
197 Int4,
198 // int4 ivec4
199 UInt2,
200 // uint2 uvec2
201 UInt3,
202 // uint3 uvec3
203 UInt4,
204 // uint4 uvec4
205 Half2,
206 // half2 vec2
207 Half3,
208 // half3 vec3
209 Half4,
210 // half4 vec4
211 Float2,
212 // float2 vec2
213 Float3,
214 // float3 vec3
215 Float4,
216 // float4 vec4
217 Double2,
218 // double2 dvec2
219 Double3,
220 // double3 dvec3
221 Double4,
222 // double4 dvec4
223
224 // MARK: Matrix types
225 // HLSL GLSL
226 // -----------------------------------------------------------------------------------------
227 Bool2x2,
228 // bool2x2 n/a
229 Bool2x3,
230 // bool2x3 n/a
231 Bool2x4,
232 // bool2x4 n/a
233 Bool3x2,
234 // bool3x2 n/a
235 Bool3x3,
236 // bool3x3 n/a
237 Bool3x4,
238 // bool3x4 n/a
239 Bool4x2,
240 // bool4x2 n/a
241 Bool4x3,
242 // bool4x3 n/a
243 Bool4x4,
244 // bool4x4 n/a
245 Int2x2,
246 // int2x2 n/a
247 Int2x3,
248 // int2x3 n/a
249 Int2x4,
250 // int2x4 n/a
251 Int3x2,
252 // int3x2 n/a
253 Int3x3,
254 // int3x3 n/a
255 Int3x4,
256 // int3x4 n/a
257 Int4x2,
258 // int4x2 n/a
259 Int4x3,
260 // int4x3 n/a
261 Int4x4,
262 // int4x4 n/a
263 UInt2x2,
264 // uint2x2 n/a
265 UInt2x3,
266 // uint2x3 n/a
267 UInt2x4,
268 // uint2x4 n/a
269 UInt3x2,
270 // uint3x2 n/a
271 UInt3x3,
272 // uint3x3 n/a
273 UInt3x4,
274 // uint3x4 n/a
275 UInt4x2,
276 // uint4x2 n/a
277 UInt4x3,
278 // uint4x3 n/a
279 UInt4x4,
280 // uint4x4 n/a
281 Half2x2,
282 // half2x2 mat2
283 Half2x3,
284 // half2x3 mat2x3
285 Half2x4,
286 // half2x4 mat2x4
287 Half3x2,
288 // half3x2 mat3x2
289 Half3x3,
290 // half3x3 mat3
291 Half3x4,
292 // half3x4 mat3x4
293 Half4x2,
294 // half4x2 mat4x2
295 Half4x3,
296 // half4x3 mat4x3
297 Half4x4,
298 // half4x4 mat4
299 Float2x2,
300 // float2x2 mat2
301 Float2x3,
302 // float2x3 mat2x3
303 Float2x4,
304 // float2x4 mat2x4
305 Float3x2,
306 // float3x2 mat3x2
307 Float3x3,
308 // float3x3 mat3
309 Float3x4,
310 // float3x4 mat3x4
311 Float4x2,
312 // float4x2 mat4x2
313 Float4x3,
314 // float4x3 mat4x3
315 Float4x4,
316 // float4x4 mat4
317 Double2x2,
318 // double2x2 dmat2
319 Double2x3,
320 // double2x3 dmat2x3
321 Double2x4,
322 // double2x4 dmat2x4
323 Double3x2,
324 // double3x2 dmat3x2
325 Double3x3,
326 // double3x3 dmat3
327 Double3x4,
328 // double3x4 dmat3x4
329 Double4x2,
330 // double4x2 dmat4x2
331 Double4x3,
332 // double4x3 dmat4x3
333 Double4x4,
334 // double4x4 dmat4
335 };
336
337 // Container structure for all kinds of matrix subscript usages.
341
342 // Strict-weak-order (SWP) comparison.
343 bool operator<(const MatrixSubscriptUsage& rhs) const;
344
345 // Returns the indices to a unique string.
347
351 };
352
353 // Returns a descriptive string of the specified data type.
355
356 // Returns the size (in bytes) of the specified data type, or 0 if the data type is invalid, undefined, or equal to DataType::String.
358
359 // Returns true if the specified data type is a scalar type.
361
362 // Returns true if the specified data type is a vector type.
364
365 // Returns true if the specified data type is a matrix type.
367
368 // Returns true if the specified data type is a boolean type (i.e. bool, and all vectors and matrices of these).
370
371 // Returns true if the specified data type is a real type (i.e. half, float, double, and all vectors and matrices of these).
372 bool isRealType(const DataType t);
373
374 // Returns true if the specified data type is a half-precision real type (i.e. half, half2, half4x4 etc.).
376
377 // Returns true if the specified data type is a single-precision real type (i.e. float, float2, float4x4 etc.).
379
380 // Returns true if the specified data type is a double-precision real type (i.e. double, double2, double4x4 etc.).
382
383 // Returns true if the specified data type is an integral type (i.e. int, uint, and all vectors and matrices of these).
385
386 // Returns true if the specified data type is an integer type (i.e. int, and all vectors and matrices of these).
387 bool isIntType(const DataType t);
388
389 // Returns true if the specified data type is an unsigned-integer type (i.e. uint, and all vectors and matrices of these).
390 bool isUIntType(const DataType t);
391
395
399
400 // Returns the base data type for the specified type or DataType::Undefined on failure.
402
403 // Returns the vector data type for the specified type and vector size.
405
406 // Returns the matrix data type for the specified type, rows, and columns.
408
409 // Returns the data type for the specified swizzle operator or throws and std::invalid_argument on failure.
411
412 // Returns the data type for the specified literal token (BoolLiteral, IntLiteral, FloatLiteral, and StringLiteral).
414
415 // Returns the data type as non-double (i.e. replaces doubles by floats).
417
418 // Returns the remaining size (in bytes) of a vector slot with the specified alignment.
420
421 // Accumulates the vector size for the specified data type (with a 16 byte boundary), and returns true on success.
422 bool accumulateAlignedVectorSize(const DataType dataType, UInt32& size, UInt32& padding, UInt32* offset = nullptr);
423
424 // Primitive type enumeration.
425 enum class PrimitiveType {
426 Undefined,
427
428 Point,
429 // Point
430 Line,
431 // Line
432 LineAdj,
433 // Line adjacency
434 Triangle,
435 // Triangle
437 // Triangle adjacency
438 };
439
440 // Variable storage class enumeration.
441 enum class StorageClass {
442 Undefined,
443
444 Extern,
445 Precise,
446 Shared,
448 Static,
449 Volatile,
450 };
451
452 // Variable interpolation modifier enumeration.
453 enum class InterpModifier {
454 Undefined,
455
456 // HLSL GLSL
457 // -----------------------------------------------------------------------------------------
458 Centroid,
459 // centroid centroid
460 Linear,
461 // linear smooth
463 // nointerpolation flat
465 // noperspective noperspective
466 Sample,
467 // sample sample
468 };
469
470 // Variable type modifier enumeration.
471 enum class TypeModifier {
472 Undefined,
473
474 Const,
475 RowMajor,
477
478 SNorm,
479 UNorm,
480 };
481
482 enum class UniformBufferType {
483 Undefined,
484
486 // Constant buffer ("cbuffer" in HLSL; "uniform" in GLSL).
488 // Texture buffer ("tbuffer" in HLSL).
489 };
490
491 // Buffer (and texture) object type enumeration.
492 enum class BufferType {
493 Undefined,
494
495 // MARK: Storage Buffers
496 Buffer,
499
500 RWBuffer,
505
506 // MARK: Textures
512
513 Texture1D,
515 Texture2D,
517 Texture3D,
522
524 // Texture of unspecified dimension (used in DX9 effect files: "texture" keyword).
525
526 // MARK: Patches
529
530 // MARK: Streams
534
535 // MARK: Generic Buffers
537 // GLSL "buffer"
538 };
539
540 // Converts the specified BufferType enumeration entry into a string.
542
543 // Returns true if the specified buffer type is a storage buffer type (i.e. gets converted to a 'buffer' block in GLSL).
545
546 // Returns true if the specified buffer type is a RW (read/write) buffer type (for storage buffers and textures).
548
549 // Returns true if the specified buffer type is a texture buffer.
551
552 // Returns true if the specified buffer type is a multi-sampled texture buffer (i.e. Texture2DMS or Texture2DMSArray).
554
555 // Returns true if the specified buffer type is an image buffer (i.e. gets converted to an 'imageBuffer' in GLSL).
557
558 // Returns true if the specified buffer type is a RW (read/write) texture buffer type (represented in GLSL with 'image...').
560
561 // Returns true if the specified buffer type is an input or output patch.
563
564 // Returns true if the specified buffer type is either a point-, line-, or triangle stream.
566
567 // Returns the texture dimension of the specified buffer type in the range [1, 4] or 0 if the type is not a texture type.
569
570 // Sampler type enumeration.
571 enum class SamplerType {
572 Undefined,
573
574 // MARK: Samplers
575 // HLSL3 HLSL4+ GLSL
576 // -----------------------------------------------------------------------------------------
577 Sampler1D,
578 // sampler1D n/a sampler1D
579 Sampler2D,
580 // sampler2D n/a sampler2D
581 Sampler3D,
582 // sampler3D n/a sampler3D
584 // samplerCUBE n/a samplerCube
586 // n/a n/a sampler2DRect
588 // n/a n/a sampler1DArray
590 // n/a n/a sampler2DArray
592 // n/a n/a samplerCubeArray
594 // n/a n/a samplerBuffer
596 // n/a n/a sampler2DMS
598 // n/a n/a sampler2DMSArray
600 // sampler1DShadow n/a sampler1DShadow
602 // sampler2DShadow n/a sampler2DShadow
604 // n/a n/a samplerCubeShadow
606 // n/a n/a sampler2DRectShadow
608 // n/a n/a sampler1DArrayShadow
610 // n/a n/a sampler2DArrayShadow
612 // n/a n/a samplerCubeArrayShadow
613
614 // MARK: Sampler states
615 // HLSL3 HLSL4+ GLSL
616 // -----------------------------------------------------------------------------------------
618 // sampler_state SamplerState sampler
620 // sampler_state SamplerComparisonState samplerShadow
621 };
622
623 // Returns true if the specified sampler type is sampler state (i.e. SamplerState or SamplerComparisonState).
625
626 // Returns true if the specified sampler type is a shadow sampler (e.g. Sampler1DShadow).
628
629 // Returns true if the specified sampler type is an array sampler (e.g. Sampler1DArray).
631
632 // Returns the texture dimension of the specified sampler type in the range [1, 4] or 0 if the type is not a texture sampler (e.g. a sampler state).
634
635 // Maps a texture type to an appropriate sampler type.
637
638 // Converts a non-shadow sampler variant into a shadow one, if possible.
640
641 // Image layout format enumeration.
642 enum class ImageLayoutFormat {
643 Undefined,
644
645 // MARK: Float formats
646 F32X4,
647 // rgba32f
648 F32X2,
649 // rg32f
650 F32X1,
651 // r32f
652 F16X4,
653 // rgba16f
654 F16X2,
655 // rg16f
656 F16X1,
657 // r16f
659 // r11f_g11f_b10f
660
661 // MARK: Unsigned normalized formats
662 UN32X4,
663 // rgba16
664 UN16X2,
665 // rg16
666 UN16X1,
667 // r16
669 // rgb10_a2
670 UN8X4,
671 // rgba8
672 UN8X2,
673 // rg8
674 UN8X1,
675 // r8
676
677 // MARK: Signed normalized formats
678 SN16X4,
679 // rgba16_snorm
680 SN16X2,
681 // rg16_snorm
682 SN16X1,
683 // r16_snorm
684 SN8X4,
685 // rgba8_snorm
686 SN8X2,
687 // rg8_snorm
688 SN8X1,
689 // r8_snorm
690
691 // MARK: Signed integer formats
692 I32X4,
693 // rgba32i
694 I32X2,
695 // rg32i
696 I32X1,
697 // r32i
698 I16X4,
699 // rgba16i
700 I16X2,
701 // rg16i
702 I16X1,
703 // r16i
704 I8X4,
705 // rgba8i
706 I8X2,
707 // rg8i
708 I8X1,
709 // r8i
710
711 // MARK: UInt32eger formats
712 UI32X4,
713 // rgba32ui
714 UI32X2,
715 // rg32ui
716 UI32X1,
717 // r32ui
718 UI16X4,
719 // rgba16ui
720 UI16X2,
721 // rg16ui
722 UI16X1,
723 // r16ui
725 // rgb10_a2ui
726 UI8X4,
727 // rgba8ui
728 UI8X2,
729 // rg8ui
730 UI8X1,
731 // r8ui
732 };
733
734 // Returns the base type of a single component in the specified image layout format.
736
737 // Returns the image layout format for the specified data type or ImageLayoutFormat::Undefined.
739
740 // Register type enumeration.
741 enum class RegisterType {
742 Undefined,
743
745 // 'b'-register
747 // 't'-register
749 // 'c'-register
750 Sampler,
751 // 's'-register
753 // 'u'-register
754 };
755
756 // Returns the register type for the specified register character (e.g. 'b' for ConstantBuffer).
758
759 // Returns the respective register character for the specified register type (e.g. 'b' for ConstantBuffer).
761
762 // Returns a descriptive string for the specified register type.
764
765 // Attribute type enumeration (TODO: incomplete list).
766 enum class AttributeType {
767 Undefined,
768
769 // MARK: HLSL 3 attributes
770 Branch,
771 // [branch]
772 Call,
773 // [call]
774 Flatten,
775 // [flatten]
776 IfAll,
777 // [ifAll]
778 IfAny,
779 // [ifAny]
780 Isolate,
781 // [isolate]
782 Loop,
783 // [loop]
785 // [maxexports(N)]
787 // [maxInstructionCount(N)]
789 // [maxtempreg(N)]
791 // [noExpressionOptimizations]
792 Predicate,
793 // [predicate]
795 // [predicateBlock]
797 // [reduceTempRegUsage(N)]
799 // [removeUnusedInputs]
800 SampReg,
801 // [sampreg(N, M)]
802 Unroll,
803 // [unroll(MaxIterationCount)]
804 Unused,
805 // [unused]
806 Xps,
807 // [xps]
808
809 // MARK: HLSL 4+ attributes
810 Domain,
811 // [domain(STRING)]
813 // [earlydepthstencil]
814 Instance,
815 // [instance(N)]
817 // [maxtessfactor(X)]
819 // [maxvertexcount(N)]
821 // [numthreads(X, Y, Z)]
823 // [outputcontrolpoints(N)]
825 // [outputtopology(STRING)]
827 // [partitioning(STRING)]
828 PatchSize,
829 // [patchsize(N)]
831 // [patchconstantfunc(STRING)]
832
833 // MARK: GLSL Layout Attributes
834 Align,
835 // layout(align = <EXPRESSION>)
836 Binding,
837 // layout(binding = <EXPRESSION>)
838 CW,
839 // layout(cw)
840 CCW,
841 // layout(ccw)
843 // layout(column_major)
844 Component,
845 // layout(component = <EXPRESSION>)
846 DepthAny,
847 // layout(depth_any)
849 // layout(depth_greater)
850 DepthLess,
851 // layout(depth_less)
853 // layout(depth_unchanged)
855 // layout(early_fragment_tests)
857 // layout(equal_spacing)
859 // layout(fractional_even_spacing)
861 // layout(fractional_odd_spacing)
862 Index,
863 // layout(index = <EXPRESSION>)
865 // layout(invocations = <EXPRESSION>)
866 Isolines,
867 // layout(isolines)
868 Lines,
869 // layout(lines)
871 // layout(lines_adjacency)
872 LineStrip,
873 // layout(line_strip)
875 // layout(local_size_x = <EXPRESSION>)
877 // layout(local_size_y = <EXPRESSION>)
879 // layout(local_size_z = <EXPRESSION>)
880 Location,
881 // layout(location = <EXPRESSION>)
883 // layout(max_vertices = <EXPRESSION>)
885 // layout(origin_upper_left)
886 Offset,
887 // layout(offset = <EXPRESSION>)
888 Packed,
889 // layout(packed)
891 // layout(pixel_center_integer)
892 Points,
893 // layout(points)
894 PointMode,
895 // layout(point_mode)
896 Quads,
897 // layout(quads)
898 RowMajor,
899 // layout(row_major)
900 Shared,
901 // layout(shared)
902 Std140,
903 // layout(std140)
904 Std430,
905 // layout(std430)
906 Stream,
907 // layout(stream = <EXPRESSION>)
908 Triangles,
909 // layout(triangles)
911 // layout(triangles_adjacency)
913 // layout(triangle_strip)
914 Vertices,
915 // layout(vertices = <EXPRESSION>)
916 XfbBuffer,
917 // layout(xfb_buffer = <EXPRESSION>)
918 XfbOffset,
919 // layout(xfb_offset = <EXPRESSION>)
920 XfbStride,
921 // layout(xfb_stride = <EXPRESSION>)
922 Set,
923 // layout(set = <EXPRESSION>)
924
925 // MARK: Extended Attributes
926 Space,
927 // Extended attribute to specify a vector space.
928 Layout,
929 // Extended attribute to specify a layout format.
930 };
931
932 // Returns true if the specified attribute is supported since shader model 3.
934
935 // Returns true if the specified attribute is supported since shader model 5.
937
938 // Returns true if the specified attribute is supported only in HLSL, e.g. [ATTRIBUTE].
940
941 // Returns true if the specified attribute is supported only in GLSL, e.g. layout(ATTRIBUTE).
943
944 // Returns true if the specified attribute is an extended attribute, i.e. AttributeType::Space, AttributeType::Layout.
946
947 // Value enumeration of required attributes (e.g. domain types for tess.-control shader).
965
966 // Returns true if the specified attribute value belongs to the 'domain' attribute.
968
969 // Returns true if the specified attribute value belongs to the 'outputtopology' attribute.
971
972 // Returns true if the specified attribute value belongs to the 'partitioning' attribute.
974
975 // Returns true if the specified attribute value is a triangle 'partitioning' attribute, i.e. either OutputTopologyTriangleCW or OutputTopologyTriangleCCW.
977
980 enum class Intrinsic {
981 Undefined,
982
983 // MARK: Common global intrinsics
984 // HLSL GLSL
985 // -----------------------------------------------------------------------------------------
986 Abort,
987 // abort n/a
988 Abs,
989 // abs abs
990 ACos,
991 // acos acos
992 All,
993 // all all
995 // AllMemoryBarrier memoryBarrier
997 // AllMemoryBarrierWithGroupSync n/a
998 Any,
999 // any any
1000 AsDouble,
1001 // asdouble uint64BitsToDouble
1002 AsFloat,
1003 // asfloat uintBitsToFloat
1004 ASin,
1005 // asin asin
1006 AsInt,
1007 // asint floatBitsToInt
1008 AsUInt1,
1009 // asuint floatBitsToUint
1010 AsUInt3,
1011 // asuint n/a
1012 ATan,
1013 // atan atan
1014 ATan2,
1015 // atan2 atan
1016 Ceil,
1017 // ceil cail
1019 // CheckAccessFullyMapped n/a
1020 Clamp,
1021 // clamp clamp
1022 Clip,
1023 // clip n/a
1024 Cos,
1025 // cos cos
1026 CosH,
1027 // cosh cosh
1028 CountBits,
1029 // countbits bitCount
1030 Cross,
1031 // cross cross
1033 // D3DCOLORtoUBYTE4 n/a
1034 DDX,
1035 // ddx dFdx
1036 DDXCoarse,
1037 // ddx_coarse dFdxCoarse
1038 DDXFine,
1039 // ddx_fine dFdxFine
1040 DDY,
1041 // ddy dFdy
1042 DDYCoarse,
1043 // ddy_coarse dFdyCoarse
1044 DDYFine,
1045 // ddy_fine dFdyFine
1046 Degrees,
1047 // degrees degrees
1049 // determinant determinant
1051 // DeviceMemoryBarrier n/a
1053 // DeviceMemoryBarrierWithGroupSync n/a
1054 Distance,
1055 // distance distance
1056 Dot,
1057 // dot dot
1058 Dst,
1059 // dst n/a
1060 Equal,
1061 // n/a equal
1062 ErrorF,
1063 // errorf n/a
1065 // EvaluateAttributeAtCentroid interpolateAtCentroid
1067 // EvaluateAttributeAtSample interpolateAtSample
1069 // EvaluateAttributeSnapped interpolateAtOffset
1070 Exp,
1071 // exp exp
1072 Exp2,
1073 // exp2 exp2
1074 F16toF32,
1075 // f16tof32 n/a
1076 F32toF16,
1077 // f32tof16 n/a
1079 // faceforward faceforward
1081 // firstbithigh findMSB
1083 // firstbitlow findLSB
1084 Floor,
1085 // floor floor
1086 FMA,
1087 // fma fma
1088 FMod,
1089 // fmod mod
1090 Frac,
1091 // frac fract
1092 FrExp,
1093 // frexp frexp
1094 FWidth,
1095 // fwidth fwidth
1097 // GetRenderTargetSampleCount n/a
1099 // GetRenderTargetSamplePosition n/a
1101 // n/a greaterThan
1103 // n/a greaterThanEqual
1105 // GroupMemoryBarrier groupMemoryBarrier
1107 // GroupMemoryBarrierWithGroupSync n/a
1109 // InterlockedAdd atomicAdd
1111 // InterlockedAnd atomicAnd
1113 // InterlockedCompareExchange atomicCompSwap
1115 // InterlockedCompareStore n/a
1117 // InterlockedExchange atomicExchange
1119 // InterlockedMax atomicMax
1121 // InterlockedMin atomicMin
1123 // InterlockedOr atomicOr
1125 // InterlockedXor atomicXor
1126 IsFinite,
1127 // isfinite n/a
1128 IsInf,
1129 // isinf isinf
1130 IsNaN,
1131 // isnan isnan
1132 LdExp,
1133 // ldexp ldexp
1134 Length,
1135 // length length
1136 Lerp,
1137 // lerp mix
1138 LessThan,
1139 // n/a lessThan
1141 // n/a lessThanEqual
1142 Lit,
1143 // lit n/a
1144 Log,
1145 // log log
1146 Log10,
1147 // log10 n/a
1148 Log2,
1149 // log2 log2
1150 MAD,
1151 // mad fma
1152 Max,
1153 // max max
1154 Min,
1155 // min min
1156 ModF,
1157 // modf modf
1158 MSAD4,
1159 // msad4 n/a
1160 Mul,
1161 // mul n/a
1162 Normalize,
1163 // normalize normalize
1164 NotEqual,
1165 // n/a notEqual
1166 Not,
1167 // n/a not
1168 Pow,
1169 // pow pow
1170 PrintF,
1171 // printf n/a
1173 // Process2DQuadTessFactorsAvg n/a
1175 // Process2DQuadTessFactorsMax n/a
1177 // Process2DQuadTessFactorsMin n/a
1179 // ProcessIsolineTessFactors n/a
1181 // ProcessQuadTessFactorsAvg n/a
1183 // ProcessQuadTessFactorsMax n/a
1185 // ProcessQuadTessFactorsMin n/a
1187 // ProcessTriTessFactorsAvg n/a
1189 // ProcessTriTessFactorsMax n/a
1191 // ProcessTriTessFactorsMin n/a
1192 Radians,
1193 // radians radians
1194 Rcp,
1195 // rcp n/a
1196 Reflect,
1197 // reflect reflect
1198 Refract,
1199 // refract refract
1201 // reversebits n/a
1202 Round,
1203 // round round
1204 RSqrt,
1205 // rsqrt inversesqrt
1206 Saturate,
1207 // saturate n/a
1208 Sign,
1209 // sign sign
1210 Sin,
1211 // sin sin
1212 SinCos,
1213 // sincos n/a
1214 SinH,
1215 // sinh sinh
1216 SmoothStep,
1217 // smoothstep smoothstep
1218 Sqrt,
1219 // sqrt sqrt
1220 Step,
1221 // step step
1222 Tan,
1223 // tan tan
1224 TanH,
1225 // tanh tanh
1226 Transpose,
1227 // transpose transpose
1228 Trunc,
1229 // trunc trunc
1230
1231 // MARK: HLSL 3 texture intrinsics
1232 Tex1D2,
1233 Tex1D4,
1234 Tex1DBias,
1235 Tex1DGrad,
1236 Tex1DLod,
1237 Tex1DProj,
1238 Tex2D2,
1239 Tex2D4,
1240 Tex2DBias,
1241 Tex2DGrad,
1242 Tex2DLod,
1243 Tex2DProj,
1244 Tex3D2,
1245 Tex3D4,
1246 Tex3DBias,
1247 Tex3DGrad,
1248 Tex3DLod,
1249 Tex3DProj,
1250 TexCube2,
1251 TexCube4,
1254 TexCubeLod,
1256
1257 // MARK: HLSL 4+ class intrinsics
1260 // CalculateLevelOfDetail(SamplerState S, float[1,2,3] Location)
1262 // CalculateLevelOfDetailUnclamped(SamplerState S, float[1,2,3] Location)
1263
1265 // Load(int[1,2,3,4] Location)
1267 // Load(int[1,2,3,4] Location, Int32 SampleIndex)
1269 // Load(int[1,2,3,4] Location, Int32 SampleIndex, Int32 Offset)
1270
1272 // Sample(SamplerState S, float[1,2,3,4] Location)
1274 // Sample(SamplerState S, float[1,2,3,4] Location, int[1,2,3] Offset)
1276 // Sample(SamplerState S, float[1,2,3,4] Location, int[1,2,3] Offset, float Clamp)
1278 // Sample(SamplerState S, float[1,2,3,4] Location, int[1,2,3] Offset, float Clamp, out uint Status)
1295 // SampleLevel(SamplerState S, float[1,2,3,4] Location, float LOD)
1297 // SampleLevel(SamplerState S, float[1,2,3,4] Location, float LOD, int[1,2,3] Offset)
1299 // SampleLevel(SamplerState S, float[1,2,3,4] Location, float LOD, int[1,2,3] Offset, out uint Status)
1300
1302 // Gather(SamplerState S, float[2,3,4] Location)
1304 // GatherRed(SamplerState S, float[2,3,4] Location)
1306 // GatherGreen(SamplerState S, float[2,3,4] Location)
1308 // GatherBlue(SamplerState S, float[2,3,4] Location)
1310 // GatherAlpha(SamplerState S, float[2,3,4] Location)
1311
1313 // Gather(SamplerState S, float[2,3] Location, int2 Offset)
1315 // Gather(SamplerState S, float[2,3] Location, int2 Offset, out uint Status)
1317 // GatherRed(SamplerState S, float[2,3] Location, int2 Offset)
1319 // GatherRed(SamplerState S, float[2,3] Location, int2 Offset, out uint Status)
1321 // GatherGreen(SamplerState S, float[2,3] Location, int2 Offset)
1323 // GatherGreen(SamplerState S, float[2,3] Location, int2 Offset, out uint Status)
1325 // GatherBlue(SamplerState S, float[2,3] Location, int2 Offset)
1327 // GatherBlue(SamplerState S, float[2,3] Location, int2 Offset, out uint Status)
1329 // GatherAlpha(SamplerState S, float[2,3] Location, int2 Offset)
1331 // GatherAlpha(SamplerState S, float[2,3] Location, int2 Offset, out uint Status)
1332
1334 // GatherRed(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1336 // GatherRed(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1338 // GatherGreen(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1340 // GatherGreen(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1342 // GatherBlue(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1344 // GatherBlue(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1346 // GatherAlpha(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1348 // GatherAlpha(SamplerState S, float[2,3] Location, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1349
1351 // GatherCmp(SamplerComparisonState S, float[2,3,4] Location, float CompareValue)
1353 // GatherCmpRed(SamplerComparisonState S, float[2,3,4] Location, float CompareValue)
1355 // GatherCmpGreen(SamplerComparisonState S, float[2,3,4] Location, float CompareValue)
1357 // GatherCmpBlue(SamplerComparisonState S, float[2,3,4] Location, float CompareValue)
1359 // GatherCmpAlpha(SamplerComparisonState S, float[2,3,4] Location, float CompareValue)
1360
1362 // GatherCmp(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset)
1364 // GatherCmp(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset, out uint Status)
1366 // GatherCmpRed(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset)
1368 // GatherCmpRed(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset, out uint Status)
1370 // GatherCmpGreen(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset)
1372 // GatherCmpGreen(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset, out uint Status)
1374 // GatherCmpBlue(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset)
1376 // GatherCmpBlue(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset, out uint Status)
1378 // GatherCmpAlpha(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset)
1380 // GatherCmpAlpha(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset, out uint Status)
1381
1383 // GatherCmpRed(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1385 // GatherCmpRed(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1387 // GatherCmpGreen(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1389 // GatherCmpGreen(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1391 // GatherCmpBlue(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1393 // GatherCmpBlue(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1395 // GatherCmpAlpha(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4)
1397 // GatherCmpAlpha(SamplerComparisonState S, float[2,3] Location, float CompareValue, int2 Offset1, int2 Offset2, int2 Offset3, int2 Offset4, out uint Status)
1398
1400 // Append(StreamDataType)
1402 // RestartStrip()
1403
1404 // MARK: GLSL only intrinsics
1405 ImageLoad,
1406 // imageLoad(gimage Image, T Location)
1407 ImageStore,
1408 // imageStore(gimage Image, T Location, G Data)
1410 // atomicAdd(inout T Memory, T Data)
1412 // atomicAnd(inout T Memory, T Data)
1414 // atomicOr(inout T Memory, T Data)
1416 // atomicXor(inout T Memory, T Data)
1418 // atomicMin(inout T Memory, T Data)
1420 // atomicMax(inout T Memory, T Data)
1422 // atomicCompSwap(inout T Memory, T compare, T Data)
1424 // atomicExchange(inout T Memory, T Data)
1425
1427 // packHalf2x16(vec2 Vec)
1428 };
1429
1430 // Container structure for all kinds of intrinsic call usages (can be used
1431 // as Map<Intrinsic, IntrinsicUsage>).
1435
1436 inline bool operator<(const ArgumentList& rhs) const { return (argTypes < rhs.argTypes); }
1437 };
1438
1439 // Set of all argument lists that where used for an intrinsic.
1441 };
1442
1443 // Returns true if the specified intrinsic is a global intrinsic.
1445
1446 // Returns true if the specified intrinsic belongs to a texture object.
1448
1449 // Returns true if the specified intrinsic is a texture gather intrinsic.
1451
1452 // Returns true if the specified intrinsic is a texture sample intrinsic.
1454
1455 // Returns true if the specified intrinsic is a texture sample or gather intrisic, with a compare operation.
1457
1458 // Returns true if the specified intrinsic is a texture sample compare intrinsic that only samples the first mip level.
1460
1461 // Returns true if the specified intrinsic is a texture load intrisic (e.g. Texture_Load1).
1463
1464 // Returns true if the specified intrinsic belongs to a stream-output object.
1466
1467 // Returns true if the specified intrinsic is an image load/store intrinsic.
1469
1470 // Returns true if the specified intrinsic in an interlocked intrinsic (e.g. Intrinsic::InterlockedAdd).
1472
1473 // Returns the respective intrinsic for the specified binary compare operator, or Intrinsic::Undefined if the operator is not a compare operator.
1475
1479
1480 // Returns the number of offset parameters accepted by the specified gather intrinsic.
1482
1483 // Maps a texture gather intrinsic to a component index (e.g. red -> 0, green -> 1, etc.)
1485
1486 // Semantic enumeration (vertex input is omitted).
1487 enum class Semantic {
1488 Undefined,
1489
1491 // User defined HLSL semantic
1492
1493 // HLSL3 HLSL4+ GLSL
1494 // -----------------------------------------------------------------------------------------
1496 // n/a SV_ClipDistance gl_ClipDistance
1498 // n/a SV_CullDistance gl_CullDistance (if ARB_cull_distance is present)
1499 Coverage,
1500 // n/a SV_Coverage gl_SampleMask
1501 Depth,
1502 // DEPTH SV_Depth gl_FragDepth
1504 // n/a SV_DepthGreaterEqual layout(depth_greater) out float gl_FragDepth
1506 // n/a SV_DepthLessEqual layout(depth_less) out float gl_FragDepth
1508 // n/a SV_DispatchThreadID gl_GlobalInvocationID
1510 // n/a SV_DomainLocation gl_TessCoord
1511 FragCoord,
1512 // VPOS SV_Position gl_FragCoord
1513 GroupID,
1514 // n/a SV_GroupID gl_WorkGroupID
1515 GroupIndex,
1516 // n/a SV_GroupIndex gl_LocalInvocationIndex
1518 // n/a SV_GroupThreadID gl_LocalInvocationID
1520 // n/a SV_GSInstanceID gl_InvocationID
1521 //HelperInvocation, // n/a n/a gl_HelperInvocation
1523 // n/a SV_InnerCoverage gl_SampleMaskIn
1525 // n/a SV_InsideTessFactor[2] gl_TessLevelInner[2]
1526 InstanceID,
1527 // n/a SV_InstanceID gl_InstanceID (OpenGL)/ gl_InstanceIndex (Vulkan)
1529 // VFACE SV_IsFrontFace gl_FrontFacing
1531 // n/a SV_OutputControlPointID gl_InvocationID
1532 PointSize,
1533 // PSIZE n/a gl_PointSize
1535 // n/a SV_PrimitiveID gl_PrimitiveID
1537 // n/a SV_RenderTargetArrayIndex gl_Layer
1539 // n/a SV_SampleIndex gl_SampleID
1540 StencilRef,
1541 // n/a SV_StencilRef gl_FragStencilRef (if ARB_shader_stencil_export is present)
1542 Target,
1543 // COLOR SV_Target gl_FragData
1544 TessFactor,
1545 // n/a SV_TessFactor[4] gl_TessLevelOuter[4]
1546 VertexID,
1547 // n/a SV_VertexID gl_VertexID (OpenGL)/ gl_VertexIndex (Vulkan)
1549 // POSITION SV_Position gl_Position
1551 // n/a SV_ViewportArrayIndex gl_ViewportIndex
1552 //NumWorkGroups, // n/a n/a gl_NumWorkGroups
1553 //WorkGroupSize, // n/a n/a gl_WorkGroupSize
1554 };
1555
1556 // Indexed semantic type with 'Semantic' enum, integral index, and implicit conversion from and to 'Semantic' enum.
1558 private:
1562
1563 public:
1564 IndexedSemantic() = default;
1567
1568 IndexedSemantic(Semantic semantic, Int32 index = 0);
1571
1572 inline operator Semantic() const { return mSemantic; }
1573
1574 // Compares this semantic with the specified semantic for a strict-weak-order (SWO).
1575 bool operator<(const IndexedSemantic& rhs) const;
1576
1577 // Returns true if this the semantic is not undefined (Semantic::Undefined).
1578 [[nodiscard]] bool isValid() const;
1579
1580 // see CeresEngine::ShaderCompiler::IsSystemSemantic
1581 [[nodiscard]] bool isSystemValue() const;
1582
1583 // see CeresEngine::ShaderCompiler::IsUserSemantic
1584 [[nodiscard]] bool isUserDefined() const;
1585
1587
1588 // Resest this semantic to undefined.
1589 void reset();
1590
1591 // Restes the index of this semantic.
1592 void resetIndex(int index);
1593
1594 // Converts this system value semantic to a user defined semantic.
1596
1597 // Returns the semantic index.
1598 [[nodiscard]] inline Int32 getIndex() const { return mIndex; }
1599 };
1600
1601 // Returns true if the specified semantic is a system value semantic.
1603
1604 // Returns true if the specified semantic is a user defined semantic.
1606
1607 // Returns the specified semantic as string.
1609
1612
1615
1618
1620
1624} // namespace CeresEngine::ShaderCompiler
bool operator<(const IndexedSemantic &rhs) const
String mUserDefined
Definition ASTEnums.hpp:1561
IndexedSemantic(const IndexedSemantic &)=default
Semantic mSemantic
Definition ASTEnums.hpp:1559
Int32 mIndex
Definition ASTEnums.hpp:1560
void makeUserDefined(const String &semanticName="")
IndexedSemantic & operator=(const IndexedSemantic &)=default
IndexedSemantic(const IndexedSemantic &rhs, Int32 index)
IndexedSemantic(const String &userDefined)
IndexedSemantic(Semantic semantic, Int32 index=0)
Int32 getIndex() const
Definition ASTEnums.hpp:1598
Log base class.
Definition Log.hpp:19
Definition Token.hpp:21
ResourceType
Resource type enumeration.
Definition Reflection.hpp:116
TextureAddressMode
Texture address mode enumeration (compatible to D3D11_TEXTURE_ADDRESS_MODE).
Definition Reflection.hpp:65
ComparisonFunc
Sample comparison function enumeration (compatible to D3D11_COMPARISON_FUNC).
Definition Reflection.hpp:75
Filter
Sampler filter enumeration (compatible to D3D11_FILTER).
Definition Reflection.hpp:24
Definition AST.hpp:33
bool isShaderModel5AttributeType(const AttributeType t)
Intrinsic compareOpToIntrinsic(const BinaryOp op)
bool isShaderModel3AttributeType(const AttributeType t)
bool isIntType(const DataType t)
TypeModifier
Definition ASTEnums.hpp:471
bool isStreamBufferType(const BufferType t)
String registerTypeToString(const RegisterType t)
AttributeValue
Definition ASTEnums.hpp:948
DataType baseDataType(const DataType t)
bool isUIntType(const DataType t)
bool isIntegralType(const DataType t)
Reflection::Filter stringToFilter(const String &s)
bool isTextureLoadIntrinsic(const Intrinsic t)
bool isAttributeValuePartitioning(const AttributeValue t)
bool isSamplerStateType(const SamplerType t)
bool isTextureGatherIntrisic(const Intrinsic t)
Reflection::ResourceType samplerTypeToResourceType(const SamplerType t)
bool isLogicalOp(const BinaryOp o)
bool isTextureSampleIntrinsic(const Intrinsic t)
bool isRwImageBufferType(const BufferType t)
bool isLValueOp(const UnaryOp o)
bool isSingleRealType(const DataType t)
Int32 getGatherIntrinsicComponentIndex(const Intrinsic t)
UnaryOp
Definition ASTEnums.hpp:119
bool isInterlockedIntristic(const Intrinsic t)
bool isBooleanType(const DataType t)
BinaryOp stringToBinaryOp(const String &s)
Reflection::ComparisonFunc stringToCompareFunc(const String &s)
BinaryOp assignOpToBinaryOp(const AssignOp op)
ImageLayoutFormat
Definition ASTEnums.hpp:642
CtrlTransfer stringToCtrlTransfer(const String &s)
String binaryOpToString(const BinaryOp o)
BinaryOp
Definition ASTEnums.hpp:58
bool isAttributeValueTrianglePartitioning(const AttributeValue t)
String unaryOpToString(const UnaryOp o)
DataType doubleToFloatDataType(const DataType dataType)
InterpModifier
Definition ASTEnums.hpp:453
Reflection::ResourceType bufferTypeToResourceType(const BufferType t)
char registerTypeToChar(const RegisterType t)
RegisterType
Definition ASTEnums.hpp:741
bool isScalarType(const DataType t)
String dataTypeToString(const DataType t, bool useTemplateSyntax=false)
DataType vectorDataType(const DataType baseDataType, Int32 vectorSize)
bool isSamplerTypeShadow(const SamplerType t)
String semanticToString(const Semantic t)
Semantic
Definition ASTEnums.hpp:1487
String compareFuncToString(const Reflection::ComparisonFunc t)
CtrlTransfer
Definition ASTEnums.hpp:147
bool isRwBufferType(const BufferType t)
UnaryOp stringToUnaryOp(const String &s)
bool isTextureCompareIntrinsic(const Intrinsic t)
bool isMatrixType(const DataType t)
Intrinsic
Intrinsics function enumeration (currently only HLSL intrinsics).
Definition ASTEnums.hpp:980
DataType getImageLayoutFormatBaseType(const ImageLayoutFormat format)
String texAddressModeToString(const Reflection::TextureAddressMode t)
bool isSamplerTypeArray(const SamplerType t)
bool isUserSemantic(const Semantic t)
StorageClass
Definition ASTEnums.hpp:441
bool isVectorType(const DataType t)
bool isDoubleRealType(const DataType t)
bool isPatchBufferType(const BufferType t)
RegisterType charToRegisterType(char c)
bool isTextureIntrinsic(const Intrinsic t)
UniformBufferType
Definition ASTEnums.hpp:482
DataType
Definition ASTEnums.hpp:159
String filterToString(const Reflection::Filter t)
bool isTextureMsBufferType(const BufferType t)
Int32 getGatherIntrinsicOffsetParamCount(const Intrinsic t)
bool isStorageBufferType(const BufferType t)
UInt32 remainingVectorSize(UInt32 vectorSize, UInt32 alignment=16u)
bool isImageBufferType(const BufferType t)
bool isHalfRealType(const DataType t)
SamplerType samplerTypeToShadowSamplerType(const SamplerType t)
Int32 getSamplerTypeTextureDim(const SamplerType t)
DataType subscriptDataType(const DataType dataType, const String &subscript, Vector< Pair< int, int > > *indices=nullptr)
bool isAttributeValueOutputTopology(const AttributeValue t)
bool accumulateAlignedVectorSize(const DataType dataType, UInt32 &size, UInt32 &padding, UInt32 *offset=nullptr)
bool isStreamOutputIntrinsic(const Intrinsic t)
Intrinsic interlockedToImageAtomicIntrinsic(const Intrinsic t)
Returns the respecitve image atomic intrinsic for the specified interlocked intrinsic,...
ImageLayoutFormat dataTypeToImageLayoutFormat(const DataType t)
String bufferTypeToString(const BufferType t)
bool isHLSLAttributeType(const AttributeType t)
UInt32 dataTypeSize(const DataType t)
bool isBooleanOp(const BinaryOp o)
bool isImageIntrinsic(const Intrinsic t)
DataType matrixDataType(const DataType baseDataType, Int32 rows, Int32 columns)
Int32 getBufferTypeTextureDim(const BufferType t)
bool isRealType(const DataType t)
bool isTextureCompareLevelZeroIntrinsic(const Intrinsic t)
bool isExtAttributeType(const AttributeType t)
BufferType
Definition ASTEnums.hpp:492
String resourceTypeToString(const Reflection::ResourceType t)
String assignOpToString(const AssignOp o)
bool isBitwiseOp(const AssignOp o)
bool isGlobalIntrinsic(const Intrinsic t)
Reflection::ResourceType uniformBufferTypeToResourceType(const UniformBufferType t)
SamplerType textureTypeToSamplerType(const BufferType t)
Int32 vectorTypeDim(const DataType t)
Returns the dimension of the specified data type interpreted as vector type.
bool isSystemSemantic(const Semantic t)
bool isAttributeValueDomain(const AttributeValue t)
bool isCompareOp(const BinaryOp o)
PrimitiveType
Definition ASTEnums.hpp:425
AssignOp
Definition ASTEnums.hpp:24
AssignOp stringToAssignOp(const String &s)
DataType tokenToDataType(const Token &token)
Reflection::TextureAddressMode stringToTexAddressMode(const String &s)
bool isGLSLAttributeType(const AttributeType t)
Pair< int, int > matrixTypeDim(const DataType t)
Returns the dimensions MxN of the specified data type interpreted as matrix type.
bool isTextureBufferType(const BufferType t)
SamplerType
Definition ASTEnums.hpp:571
AttributeType
Definition ASTEnums.hpp:766
String ctrlTransformToString(const CtrlTransfer ct)
auto indices(const Container &container)
Returns an iterator that increases it's value from 0 to container.size() by 1 on each step.
Definition Iterator.hpp:354
std::pair< First, Second > Pair
Pair is a struct template that provides a way to store two heterogeneous objects as a single unit.
Definition Pair.hpp:18
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
std::int32_t Int32
Definition DataTypes.hpp:21
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::set< Key, Compare, ScopedAllocatorAdaptor< StdAllocator< Key, RawAllocator > > > Set
Set is an associative container that contains a sorted set of unique objects of type Key.
Definition Set.hpp:21
bool operator<(const ArgumentList &rhs) const
Definition ASTEnums.hpp:1436
Vector< DataType > argTypes
Definition ASTEnums.hpp:1434
Set< ArgumentList > argLists
Definition ASTEnums.hpp:1440
DataType dataTypeOut
Definition ASTEnums.hpp:350
bool operator<(const MatrixSubscriptUsage &rhs) const
Vector< Pair< int, int > > indices
Definition ASTEnums.hpp:348
MatrixSubscriptUsage(const DataType dataTypeIn, const String &subscript)
DataType dataTypeIn
Definition ASTEnums.hpp:349