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;
A class that represents an atomic code section of shader based program function.
static String Type
The type of this class.
ParameterPtr mParameter
The parameter being carried by the operand.
ushort mIndirectionLevel
The level of indirection.
vector< Operand >::type OperandVector
OpSemantic getSemantic() const
Returns the operand semantic (do we read/write or both with the parameter).
virtual ~FunctionAtom()
Class default destructor.
Comparator function to be used for sorting.
The parameter is a output parameter.
bool hasFreeFields() const
Returns true if not all fields used.
A class that represents function invocation code from shader based program function.
FunctionAtomInstanceList::const_iterator FunctionAtomInstanceConstIterator
Comparator function to be used for comparisons.
const String & getFunctionName() const
Return the function name.
int getMask() const
Returns the mask bitfield.
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
A class that represents a function operand (its the combination of a parameter the in/out semantic an...
int mInternalExecutionOrder
int mMask
Which part of the parameter should be passed (x,y,z,w)
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
const ParameterPtr & getParameter() const
Returns the parameter object as weak reference.
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()
OpSemantic mSemantic
Tells if the parameter is of type input,output or both.
vector< FunctionAtom * >::type FunctionAtomInstanceList
OperandVector & getOperandList()
Get a list of parameters this function invocation will use in the function call as arguments...
FunctionAtomInstanceList::iterator FunctionAtomInstanceIterator
The parameter is a input parameter.
const String & getReturnType() const
Return the return type.
ushort getIndirectionLevel() const
Returns the level of indirection.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
bool operator<(SharedPtr< T > const &a, SharedPtr< U > const &b)