MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / modifiesState

Method modifiesState

glslang/MachineIndependent/Intermediate.cpp:3031–3057  ·  view source on GitHub ↗

Say whether or not an operation node changes the value of a variable. Returns true if state is modified.

Source from the content-addressed store, hash-verified

3029// Returns true if state is modified.
3030//
3031bool TIntermOperator::modifiesState() const
3032{
3033 switch (op) {
3034 case EOpPostIncrement:
3035 case EOpPostDecrement:
3036 case EOpPreIncrement:
3037 case EOpPreDecrement:
3038 case EOpAssign:
3039 case EOpAddAssign:
3040 case EOpSubAssign:
3041 case EOpMulAssign:
3042 case EOpVectorTimesMatrixAssign:
3043 case EOpVectorTimesScalarAssign:
3044 case EOpMatrixTimesScalarAssign:
3045 case EOpMatrixTimesMatrixAssign:
3046 case EOpDivAssign:
3047 case EOpModAssign:
3048 case EOpAndAssign:
3049 case EOpInclusiveOrAssign:
3050 case EOpExclusiveOrAssign:
3051 case EOpLeftShiftAssign:
3052 case EOpRightShiftAssign:
3053 return true;
3054 default:
3055 return false;
3056 }
3057}
3058
3059//
3060// returns true if the operator is for one of the constructors

Callers 2

visitBinaryMethod · 0.80
visitUnaryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected