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

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15