summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/Operator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/Operator.h')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/Operator.h126
1 files changed, 75 insertions, 51 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/Operator.h b/src/3rdparty/angle/src/compiler/translator/Operator.h
index b0efb8f48b..72f3dbf3f6 100644
--- a/src/3rdparty/angle/src/compiler/translator/Operator.h
+++ b/src/3rdparty/angle/src/compiler/translator/Operator.h
@@ -12,15 +12,21 @@
//
enum TOperator
{
- EOpNull, // if in a node, should only mean a node is still being built
- EOpSequence, // denotes a list of statements, or parameters, etc.
- EOpFunctionCall,
- EOpFunction, // For function definition
- EOpParameters, // an aggregate listing the parameters to a function
+ EOpNull, // if in a node, should only mean a node is still being built
- EOpDeclaration,
- EOpInvariantDeclaration, // Specialized declarations for attributing invariance
- EOpPrototype,
+ // Call a function defined in the AST. This might be a user-defined function or a function
+ // inserted by an AST transformation.
+ EOpCallFunctionInAST,
+
+ // Call an internal helper function with a raw implementation - the implementation can't be
+ // subject to AST transformations. Raw functions have a few constraints to keep them compatible
+ // with AST traversers:
+ // * They should not return arrays.
+ // * They should not have out parameters.
+ EOpCallInternalRawFunction,
+
+ // Call a built-in function like a texture or image function.
+ EOpCallBuiltInFunction,
//
// Unary operators
@@ -29,7 +35,6 @@ enum TOperator
EOpNegative,
EOpPositive,
EOpLogicalNot,
- EOpVectorLogicalNot,
EOpBitwiseNot,
EOpPostIncrement,
@@ -37,8 +42,11 @@ enum TOperator
EOpPreIncrement,
EOpPreDecrement,
+ EOpArrayLength,
+
//
- // binary operations
+ // binary operations (ones with special GLSL syntax are used in TIntermBinary nodes, others in
+ // TIntermAggregate nodes)
//
EOpAdd,
@@ -46,20 +54,28 @@ enum TOperator
EOpMul,
EOpDiv,
EOpIMod,
+
EOpEqual,
EOpNotEqual,
- EOpVectorEqual,
- EOpVectorNotEqual,
EOpLessThan,
EOpGreaterThan,
EOpLessThanEqual,
EOpGreaterThanEqual,
+
+ EOpEqualComponentWise,
+ EOpNotEqualComponentWise,
+ EOpLessThanComponentWise,
+ EOpLessThanEqualComponentWise,
+ EOpGreaterThanComponentWise,
+ EOpGreaterThanEqualComponentWise,
+
EOpComma,
EOpVectorTimesScalar,
EOpVectorTimesMatrix,
EOpMatrixTimesVector,
EOpMatrixTimesScalar,
+ EOpMatrixTimesMatrix,
EOpLogicalOr,
EOpLogicalXor,
@@ -77,10 +93,8 @@ enum TOperator
EOpIndexDirectStruct,
EOpIndexDirectInterfaceBlock,
- EOpVectorSwizzle,
-
//
- // Built-in functions potentially mapped to operators
+ // Built-in functions mapped to operators (either unary or with multiple parameters)
//
EOpRadians,
@@ -131,6 +145,9 @@ enum TOperator
EOpIntBitsToFloat,
EOpUintBitsToFloat,
+ EOpFrexp,
+ EOpLdexp,
+
EOpPackSnorm2x16,
EOpPackUnorm2x16,
EOpPackHalf2x16,
@@ -138,21 +155,25 @@ enum TOperator
EOpUnpackUnorm2x16,
EOpUnpackHalf2x16,
+ EOpPackUnorm4x8,
+ EOpPackSnorm4x8,
+ EOpUnpackUnorm4x8,
+ EOpUnpackSnorm4x8,
+
EOpLength,
EOpDistance,
EOpDot,
EOpCross,
EOpNormalize,
- EOpFaceForward,
+ EOpFaceforward,
EOpReflect,
EOpRefract,
- EOpDFdx, // Fragment only, OES_standard_derivatives extension
- EOpDFdy, // Fragment only, OES_standard_derivatives extension
- EOpFwidth, // Fragment only, OES_standard_derivatives extension
-
- EOpMatrixTimesMatrix,
+ EOpDFdx, // Fragment only, OES_standard_derivatives extension
+ EOpDFdy, // Fragment only, OES_standard_derivatives extension
+ EOpFwidth, // Fragment only, OES_standard_derivatives extension
+ EOpMulMatrixComponentWise,
EOpOuterProduct,
EOpTranspose,
EOpDeterminant,
@@ -160,46 +181,33 @@ enum TOperator
EOpAny,
EOpAll,
+ EOpLogicalNotComponentWise,
+
+ EOpBitfieldExtract,
+ EOpBitfieldInsert,
+ EOpBitfieldReverse,
+ EOpBitCount,
+ EOpFindLSB,
+ EOpFindMSB,
+ EOpUaddCarry,
+ EOpUsubBorrow,
+ EOpUmulExtended,
+ EOpImulExtended,
//
// Branch
//
- EOpKill, // Fragment only
+ EOpKill, // Fragment only
EOpReturn,
EOpBreak,
EOpContinue,
//
- // Constructors
+ // Constructor
//
- EOpConstructInt,
- EOpConstructUInt,
- EOpConstructBool,
- EOpConstructFloat,
- EOpConstructVec2,
- EOpConstructVec3,
- EOpConstructVec4,
- EOpConstructBVec2,
- EOpConstructBVec3,
- EOpConstructBVec4,
- EOpConstructIVec2,
- EOpConstructIVec3,
- EOpConstructIVec4,
- EOpConstructUVec2,
- EOpConstructUVec3,
- EOpConstructUVec4,
- EOpConstructMat2,
- EOpConstructMat2x3,
- EOpConstructMat2x4,
- EOpConstructMat3x2,
- EOpConstructMat3,
- EOpConstructMat3x4,
- EOpConstructMat4x2,
- EOpConstructMat4x3,
- EOpConstructMat4,
- EOpConstructStruct,
+ EOpConstruct,
//
// moves
@@ -222,10 +230,26 @@ enum TOperator
EOpBitShiftRightAssign,
EOpBitwiseAndAssign,
EOpBitwiseXorAssign,
- EOpBitwiseOrAssign
+ EOpBitwiseOrAssign,
+
+ // barriers
+ EOpBarrier,
+ EOpMemoryBarrier,
+ EOpMemoryBarrierAtomicCounter,
+ EOpMemoryBarrierBuffer,
+ EOpMemoryBarrierImage,
+ EOpMemoryBarrierShared,
+ EOpGroupMemoryBarrier,
+
+ // Geometry only
+ EOpEmitVertex,
+ EOpEndPrimitive
};
// Returns the string corresponding to the operator in GLSL
-const char* GetOperatorString(TOperator op);
+const char *GetOperatorString(TOperator op);
+
+// Say whether or not a binary or unary operation changes the value of a variable.
+bool IsAssignment(TOperator op);
#endif // COMPILER_TRANSLATOR_OPERATOR_H_