27 #ifndef _ShaderProgramProcessor_
28 #define _ShaderProgramProcessor_
63 virtual const String& getTargetLanguage()
const = 0;
70 virtual bool preCreateGpuPrograms(
ProgramSet* programSet) = 0;
76 virtual bool postCreateGpuPrograms(
ProgramSet* programSet) = 0;
95 void addSourceParameter(
ParameterPtr srcParam,
int mask);
110 int getUsedFloatCount();
113 ParameterPtr getDestinationParameter(
int usage,
int index);
118 void createDestinationParameter(
int usage,
int index);
127 int mSrcParameterMask[4];
129 int mDstParameterMask[4];
143 size_t srcParameterTypeCount[4];
145 int srcParameterMask[4];
148 int float1Count,
int float1Mask,
149 int float2Count,
int float2Mask,
150 int float3Count,
int float3Mask,
151 int float4Count,
int float4Mask)
153 srcParameterTypeCount[0] = float1Count;
154 srcParameterTypeCount[1] = float2Count;
155 srcParameterTypeCount[2] = float3Count;
156 srcParameterTypeCount[3] = float4Count;
157 srcParameterMask[0] = float1Mask;
158 srcParameterMask[1] = float2Mask;
159 srcParameterMask[2] = float3Mask;
160 srcParameterMask[3] = float4Mask;
174 void buildMergeCombinations();
188 void countVsTexcoordOutputs(
Function* vsMain,
int& outTexCoordSlots,
int& outTexCoordFloats);
252 static int getParameterMaskByFloatCount(
int floatCount);
map< Parameter *, ParameterPtr >::type LocalParameterMap
vector< ParameterPtr >::type ShaderParameterList
MergeCombination(int float1Count, int float1Mask, int float2Count, int float2Mask, int float3Count, int float3Mask, int float4Count, int float4Mask)
map< Function *, String * >::type mFunctionMap
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