27 #ifndef _ShaderFunctionAtom_
28 #define _ShaderFunctionAtom_
59 int getGroupExecutionOrder()
const;
62 int getInternalExecutionOrder()
const;
65 virtual void writeSourceCode(std::ostream& os,
const String& targetLanguage)
const = 0;
68 virtual const String& getFunctionAtomType() = 0;
103 OPM_XY = OPM_X | OPM_Y,
104 OPM_XZ = OPM_X | OPM_Z,
105 OPM_XW = OPM_X | OPM_W,
106 OPM_YZ = OPM_Y | OPM_Z,
107 OPM_YW = OPM_Y | OPM_W,
108 OPM_ZW = OPM_Z | OPM_W,
109 OPM_XYZ = OPM_X | OPM_Y | OPM_Z,
110 OPM_XYW = OPM_X | OPM_Y | OPM_W,
111 OPM_XZW = OPM_X | OPM_Z | OPM_W,
112 OPM_YZW = OPM_Y | OPM_Z | OPM_W,
113 OPM_XYZW = OPM_X | OPM_Y | OPM_Z | OPM_W
138 bool hasFreeFields()
const {
return ((mMask & ~OPM_ALL) && ((mMask & ~OPM_X) || (mMask & ~OPM_Y) || (mMask & ~OPM_Z) || (mMask & ~OPM_W))); }
157 static String getMaskAsString(
int mask);
160 static int getFloatCount(
int mask);
198 virtual void writeSourceCode(std::ostream& os,
const String& targetLanguage)
const;
int mInternalExecutionOrder
static String Type
The type of this class.
The parameter is a output parameter.
FunctionAtomInstanceList::iterator FunctionAtomInstanceIterator
ushort mIndirectionLevel
The level of indirection.
bool operator<(SharedPtr< T > const &a, SharedPtr< U > const &b)
const String & getReturnType() const
Return the return type.
FunctionAtomInstanceList::const_iterator FunctionAtomInstanceConstIterator
int getMask() const
Returns the mask bitfield.
bool hasFreeFields() const
Returns true if not all fields used.
The parameter is a input parameter.
ushort getIndirectionLevel() const
Returns the level of indirection.
vector< Operand >::type OperandVector
const ParameterPtr & getParameter() const
Returns the parameter object as weak reference.
virtual ~FunctionAtom()
Class default destructor.
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
Comparator function to be used for sorting.
OpSemantic mSemantic
Tells if the parameter is of type input,output or both.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Comparator function to be used for comparisons.
OperandVector & getOperandList()
Get a list of parameters this function invocation will use in the function call as arguments...
vector< FunctionAtom * >::type FunctionAtomInstanceList
A class that represents an atomic code section of shader based program function.
const String & getFunctionName() const
Return the function name.
A class that represents a function operand (its the combination of a parameter the in/out semantic an...
ParameterPtr mParameter
The parameter being carried by the operand.
OpSemantic getSemantic() const
Returns the operand semantic (do we read/write or both with the parameter).
A class that represents function invocation code from shader based program function.
int mMask
Which part of the parameter should be passed (x,y,z,w)
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
virtual const String & getFunctionAtomType()
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)