28 #ifndef __D3D11HLSLProgram_H__
29 #define __D3D11HLSLProgram_H__
159 #define INVALID_IDX (unsigned int)-1
237 typedef std::map<std::string, unsigned int>
SlotMap;
238 typedef std::map<std::string, unsigned int>::const_iterator
SlotIterator;
336 ID3D11ClassInstance** classes,
unsigned int& numInstances,
363 const D3D11_SIGNATURE_PARAMETER_DESC &
getInputParamDesc(
unsigned int index)
const;
void CreateDomainShader()
void populateParameterNames(GpuProgramParametersSharedPtr params)
Populate the passed parameters with name->index map, must be overridden.
bool getColumnMajorMatrices(void) const
Gets whether matrix packed in column-major order.
ID3D11Buffer * getConstantBuffer(GpuProgramParametersSharedPtr params, uint16 variabilityMask)
void getMicrocodeFromCache(void)
ShaderVars::iterator ShaderVarsIter
String getNameForMicrocodeCache()
void CreateGeometryShader()
void CreateComputeShader()
InterfaceSlots mInterfaceSlots
D3d11ShaderVariables::iterator D3d11ShaderVariablesIter
void getConstantBuffers(ID3D11Buffer **buffers, unsigned int &numBuffers, ID3D11ClassInstance **classes, unsigned int &numInstances, GpuProgramParametersSharedPtr params, uint16 variabilityMask)
void doSet(void *target, const String &val)
Command object for setting macro defines.
void reinterpretGSForStreamOut(void)
void setTarget(const String &target)
Sets the shader target to compile down to, e.g.
bool mColumnMajorMatrices
D3d11ShaderTypeDescs mMemberTypeDesc
void fixVariableNameFromCg(const ShaderVarWithPosInBuf &newVar)
void CreateVertexShader()
unsigned int getNumOutputs(void) const
const String & getPreprocessorDefines(void) const
Sets the preprocessor defines use to compile the program.
vector< UINT >::type InterfaceSlots
ID3D11Buffer * mConstantBuffer
String mPreprocessorDefines
Command object for setting entry point.
void setEnableBackwardsCompatibility(bool enableBackwardsCompatibility)
Sets whether backwards compatibility is enabled.
vector< MemberTypeName >::type MemberTypeNames
unsigned int getNumInputs(void) const
static CmdEnableBackwardsCompatibility msCmdEnableBackwardsCompatibility
D3D11HLSLProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
ID3D11DomainShader * mDomainShader
void setShaderMacros(D3D_SHADER_MACRO *shaderMacros)
Sets shader macros created manually.
Abstract base class representing a high-level program (a vertex or fragment program).
vector< D3D11_SHADER_TYPE_DESC >::type D3d11ShaderTypeDescs
Interface describing a manual resource loader.
void setColumnMajorMatrices(bool columnMajor)
Sets whether matrix packing in column-major order.
BufferInfo(unsigned int index)
Command object for setting target assembler.
stdext::hash_compare< _StringBase, std::less< _StringBase > > _StringHash
unsigned long long int ResourceHandle
void setPreprocessorDefines(const String &defines)
Sets the preprocessor defines use to compile the program.
D3d11ShaderBufferDescs mD3d11ShaderBufferDescs
D3d11ShaderParameters mD3d11ShaderInputParameters
ID3D11VertexShader * mVertexShader
Command object for setting backwards compatibility.
static CmdTarget msCmdTarget
bool isSupported(void) const
Overridden from GpuProgram.
void processParamElement(String prefix, LPCSTR pName, ID3D11ShaderReflectionType *varRefType)
bool getEnableBackwardsCompatibility(void) const
Gets whether backwards compatibility is enabled.
HardwareUniformBufferSharedPtr mUniformBuffer
const D3D11_SIGNATURE_PARAMETER_DESC & getOutputParamDesc(unsigned int index) const
vector< ShaderVarWithPosInBuf >::type ShaderVars
Specialisation of VertexDeclaration for D3D11.
D3d11ShaderVariables mVarDescBuffer
std::map< std::string, unsigned int > SlotMap
void createLowLevelImpl(void)
Internal method for creating an appropriate low-level program from this high-level program...
String doGet(const void *target) const
MemberTypeNames mMemberTypeName
std::map< std::string, unsigned int >::const_iterator SlotIterator
bool operator==(const BufferInfo &other) const
ID3D11GeometryShader * getGeometryShader(void) const
const String & getCompatibleTarget(void) const
Gets the shader target promoted to the first compatible, e.g.
void unloadHighLevelImpl(void)
Internal unload implementation, must be implemented by subclasses.
const String & getLanguage(void) const
Overridden from GpuProgram.
BufferInfo(unsigned int index, const String &name)
const String & getEntryPoint(void) const
Gets the entry point defined for this program.
static CmdPreprocessorDefines msCmdPreprocessorDefines
ID3D11PixelShader * getPixelShader(void) const
String doGet(const void *target) const
static CmdEntryPoint msCmdEntryPoint
BufferInfo(const String &name)
Specialization of HighLevelGpuProgram to provide support for D3D11 High-Level Shader Language (HLSL)...
const String & getTarget(void) const
Gets the shader target to compile down to, e.g.
Command object for setting matrix packing in column-major order.
ID3D11HullShader * getHullShader(void) const
void setEntryPoint(const String &entryPoint)
Sets the entry point for this program ie the first method called.
void compileMicrocode(void)
D3d11ShaderParameters mD3d11ShaderOutputParameters
static CmdColumnMajorMatrices msCmdColumnMajorMatrices
BufferInfo & operator=(unsigned int index)
ID3D11GeometryShader * mGeometryShader
BufferInfo & operator=(const String &name)
String doGet(const void *target) const
D3d11ShaderVariables mD3d11ShaderVariables
D3D11VertexDeclaration mInputVertexDeclaration
D3d11ShaderVariableSubparts mD3d11ShaderVariableSubparts
D3d11ShaderParameters::iterator D3d11ShaderParametersIter
vector< D3D11_SHADER_BUFFER_DESC >::type D3d11ShaderBufferDescs
D3d11ShaderVariableSubparts::iterator D3d11ShaderVariableSubpartsIter
D3d11ShaderTypeDescs mD3d11ShaderTypeDescs
ID3D11ComputeShader * mComputeShader
void doSet(void *target, const String &val)
void createConstantBuffer(const UINT ByteWidth)
bool operator<(const BufferInfo &other) const
void loadFromSource(void)
Internal load implementation, must be implemented by subclasses.
unsigned int getSubroutineSlot(const String &subroutineSlotName) const
Defines a generic resource handler.
vector< GpuConstantDefinitionWithName >::type D3d11ShaderVariableSubparts
ID3D11VertexShader * getVertexShader(void) const
ID3D11HullShader * mHullShader
ID3D11ComputeShader * getComputeShader(void) const
const D3D11_SIGNATURE_PARAMETER_DESC & getInputParamDesc(unsigned int index) const
bool mEnableBackwardsCompatibility
ShaderVarWithPosInBuf & operator=(const ShaderVarWithPosInBuf &var)
D3d11ShaderVariables mVarDescPointer
ID3D11PixelShader * mPixelShader
virtual void buildConstantDefinitions() const
Build the constant definition map, must be overridden.
BufferInfo(const BufferInfo &info)
vector< byte >::type MicroCode
GpuProgramParametersSharedPtr createParameters(void)
Overridden from GpuProgram.
Abstract class which is command object which gets/sets parameters.
ShaderVars::const_iterator ShaderVarsConstIter
Information about predefined program constants.
D3D11VertexDeclaration & getInputVertexDeclaration()
vector< String * >::type mSerStrings
ID3D11DomainShader * getDomainShader(void) const
void doSet(void *target, const String &val)
String doGet(const void *target) const
vector< D3D11_SHADER_VARIABLE_DESC >::type D3d11ShaderVariables
BufferInfo & operator=(const BufferInfo &info)
vector< D3D11_SIGNATURE_PARAMETER_DESC >::type D3d11ShaderParameters
std::set< BufferInfo >::iterator BufferInfoIterator
void populateDef(D3D11_SHADER_TYPE_DESC &d3dDesc, GpuConstantDefinition &def) const
const MicroCode & getMicroCode(void) const
BufferInfoMap mBufferInfoMap
std::set< BufferInfo > BufferInfoMap
void doSet(void *target, const String &val)
String doGet(const void *target) const
void doSet(void *target, const String &val)
D3D_SHADER_MACRO * mShaderMacros