27 #ifndef _ShaderProgramProcessor_
28 #define _ShaderProgramProcessor_
64 virtual const String& getTargetLanguage ()
const = 0;
71 virtual bool preCreateGpuPrograms (
ProgramSet* programSet) = 0;
77 virtual bool postCreateGpuPrograms (
ProgramSet* programSet) = 0;
96 void addSourceParameter (
ParameterPtr srcParam,
int mask);
111 int getUsedFloatCount ();
114 ParameterPtr getDestinationParameter (
int usage,
int index);
119 void createDestinationParameter (
int usage,
int index);
125 int mSrcParameterMask[4];
126 int mDstParameterMask[4];
137 size_t srcParamterTypeCount[4];
138 int srcParameterMask[4];
141 int float1Count,
int float1Mask,
142 int float2Count,
int float2Mask,
143 int float3Count,
int float3Mask,
144 int float4Count,
int float4Mask)
146 srcParamterTypeCount[0] = float1Count;
147 srcParamterTypeCount[1] = float2Count;
148 srcParamterTypeCount[2] = float3Count;
149 srcParamterTypeCount[3] = float4Count;
150 srcParameterMask[0] = float1Mask;
151 srcParameterMask[1] = float2Mask;
152 srcParameterMask[2] = float3Mask;
153 srcParameterMask[3] = float4Mask;
167 void buildMergeCombinations ();
181 void countVsTexcoordOutputs (
Function* vsMain,
int& outTexCoordSlots,
int& outTexCoordFloats);
245 static int getParameterMaskByFloatCount (
int floatCount);
map< Parameter *, ParameterPtr >::type LocalParameterMap
vector< ParameterPtr >::type ShaderParameterList
Specialisation of SharedPtr to allow SharedPtr to be assigned to GpuProgramPtr.
MergeCombination(int float1Count, int float1Mask, int float2Count, int float2Mask, int float3Count, int float3Mask, int float4Count, int float4Mask)
ParameterPtr mDstParameter
GpuProgramType
Enumerates the types of programs which can run on the GPU.
size_t mSrcParameterCount
A class that provides extra processing services on CPU based programs.
int getDestinationParameterMask(unsigned int index) const
Return destination parameter mask by index.
int getSourceParameterMask(unsigned int index) const
Return source parameter mask by index.
ParameterPtr getSourceParameter(unsigned int index)
Return source parameter by index.
size_t getSourceParameterCount() const
Return the source parameter count.
vector< MergeParameter >::type MergeParameterList
vector< Operand * >::type OperandPtrVector
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
A class that represents a shader based program function.
MergeCombinationList mParamMergeCombinations
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
std::map< K, V, P, A > type
vector< FunctionAtom * >::type FunctionAtomInstanceList
vector< MergeCombination >::type MergeCombinationList
A class that represents a shader based program.
Container class for shader based programs.
map< Parameter *, OperandPtrVector >::type ParameterOperandMap