OgreD3D11HLSLProgram.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __D3D11HLSLProgram_H__
29 #define __D3D11HLSLProgram_H__
30 
31 #include "OgreD3D11Prerequisites.h"
35 
36 
37 namespace Ogre {
39 
49  {
50  public:
52  class CmdEntryPoint : public ParamCommand
53  {
54  public:
55  String doGet(const void* target) const;
56  void doSet(void* target, const String& val);
57  };
59  class CmdTarget : public ParamCommand
60  {
61  public:
62  String doGet(const void* target) const;
63  void doSet(void* target, const String& val);
64  };
67  {
68  public:
69  String doGet(const void* target) const;
70  void doSet(void* target, const String& val);
71  };
74  {
75  public:
76  String doGet(const void* target) const;
77  void doSet(void* target, const String& val);
78  };
81  {
82  public:
83  String doGet(const void* target) const;
84  void doSet(void* target, const String& val);
85  };
86 
87  protected:
88 
94 
97  void createLowLevelImpl(void);
99  void unloadHighLevelImpl(void);
102 
103  // Recursive utility method for populateParameterNames
104  void processParamElement(String prefix, LPCSTR pName, ID3D11ShaderReflectionType* varRefType);
105 
106  void populateDef(D3D11_SHADER_TYPE_DESC& d3dDesc, GpuConstantDefinition& def) const;
107 
113 
116  ID3D11Buffer* mConstantBuffer;
117 
118  D3D_SHADER_MACRO* mShaderMacros;
120 
122 
124 
125  ID3D11VertexShader* mVertexShader;
126  ID3D11PixelShader* mPixelShader;
127  ID3D11GeometryShader* mGeometryShader;
128  ID3D11DomainShader* mDomainShader;
129  ID3D11HullShader* mHullShader;
130  ID3D11ComputeShader* mComputeShader;
131 
133  {
134  mutable String name;
135  size_t size;
136  size_t startOffset;
137 
139  {
140  name = var.name;
141  size = var.size;
142  startOffset = var.startOffset;
143  return *this;
144  }
145  };
147  typedef ShaderVars::iterator ShaderVarsIter;
148  typedef ShaderVars::const_iterator ShaderVarsConstIter;
149 
150  // A hack for cg to get the "original name" of the var in the "auto comments"
151  // that cg adds to the hlsl 4 output. This is to solve the issue that
152  // in some cases cg changes the name of the var to a new name.
153  void fixVariableNameFromCg(const ShaderVarWithPosInBuf& newVar);
154  //ShaderVars mShaderVars;
155 
156  // HACK: Multi-index emulation container to store constant buffer information by index and name at same time
157  // using tips from http://www.boost.org/doc/libs/1_35_0/libs/multi_index/doc/performance.html
158  // and http://cnx.org/content/m35767/1.2/
159 #define INVALID_IDX (unsigned int)-1
160  struct BufferInfo
161  {
163  unsigned int mIdx;
167 
168  // Default constructor
170  BufferInfo(unsigned int index, const String& name)
171  : mIdx(index), mName(name)
172  {
174  }
175 
176  // Copy constructor
177  BufferInfo(const BufferInfo& info)
178  : mIdx(info.mIdx)
179  , mName(info.mName)
181  , mShaderVars(info.mShaderVars)
182  {
183 
184  }
185 
186  // Copy operator
188  {
189  this->mIdx = info.mIdx;
190  this->mName = info.mName;
192  mShaderVars = info.mShaderVars;
193  return *this;
194  }
195 
196  // Constructors and operators used for search
197  BufferInfo(unsigned int index) : mIdx(index), mName("") { }
198  BufferInfo(const String& name) : mIdx(INVALID_IDX), mName(name) { }
199  BufferInfo& operator=(unsigned int index) { this->mIdx = index; return *this; }
200  BufferInfo& operator=(const String& name) { this->mName = name; return *this; }
201 
202  bool operator==(const BufferInfo& other) const
203  {
204  return mName == other.mName && mIdx == other.mIdx;
205  }
206  bool operator<(const BufferInfo& other) const
207  {
208  if (mIdx == INVALID_IDX || other.mIdx == INVALID_IDX)
209  {
210  return mName < other.mName;
211  }
212  else if (mName == "" || other.mName == "")
213  {
214  return mIdx < other.mIdx;
215  }
216  else
217  {
218  if (mName == other.mName)
219  {
220  return mIdx < other.mIdx;
221  }
222  else
223  {
224  return mName < other.mName;
225  }
226  }
227  }
228  };
229 
230  // Make sure that objects have index and name, or some search will fail
231  typedef std::set<BufferInfo> BufferInfoMap;
232  typedef std::set<BufferInfo>::iterator BufferInfoIterator;
234 
235  // Map to store interface slot position.
236  // Number of interface slots is size of this map.
237  typedef std::map<std::string, unsigned int> SlotMap;
238  typedef std::map<std::string, unsigned int>::const_iterator SlotIterator;
240 
242  typedef D3d11ShaderParameters::iterator D3d11ShaderParametersIter;
243 
244 
246  typedef D3d11ShaderVariables::iterator D3d11ShaderVariablesIter;
247 
249  {
250  LPCSTR Name;
251  };
253  typedef D3d11ShaderVariableSubparts::iterator D3d11ShaderVariableSubpartsIter;
254 
255  typedef struct MemberTypeName
256  {
257  LPCSTR Name;
258  };
259 
261 
266 
269  UINT mNumSlots;
282 
283  void createConstantBuffer(const UINT ByteWidth);
284  void analizeMicrocode();
285  void getMicrocodeFromCache(void);
286  void compileMicrocode(void);
287  public:
288  D3D11HLSLProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
289  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
291 
293  void setEntryPoint(const String& entryPoint) { mEntryPoint = entryPoint; }
295  const String& getEntryPoint(void) const { return mEntryPoint; }
297  void setTarget(const String& target);
299  const String& getTarget(void) const { return mTarget; }
301  const String& getCompatibleTarget(void) const;
303  void setShaderMacros(D3D_SHADER_MACRO* shaderMacros);
304 
306  void setPreprocessorDefines(const String& defines) { mPreprocessorDefines = defines; }
308  const String& getPreprocessorDefines(void) const { return mPreprocessorDefines; }
310  void setColumnMajorMatrices(bool columnMajor) { mColumnMajorMatrices = columnMajor; }
312  bool getColumnMajorMatrices(void) const { return mColumnMajorMatrices; }
314  void setEnableBackwardsCompatibility(bool enableBackwardsCompatibility) { mEnableBackwardsCompatibility = enableBackwardsCompatibility; }
318  bool isSupported(void) const;
322  const String& getLanguage(void) const;
323 
324  virtual void buildConstantDefinitions() const;
325  ID3D11VertexShader* getVertexShader(void) const;
326  ID3D11PixelShader* getPixelShader(void) const;
327  ID3D11GeometryShader* getGeometryShader(void) const;
328  ID3D11DomainShader* getDomainShader(void) const;
329  ID3D11HullShader* getHullShader(void) const;
330  ID3D11ComputeShader* getComputeShader(void) const;
331  const MicroCode & getMicroCode(void) const;
332 
333  ID3D11Buffer* getConstantBuffer(GpuProgramParametersSharedPtr params, uint16 variabilityMask);
334 
335  void getConstantBuffers(ID3D11Buffer** buffers, unsigned int& numBuffers,
336  ID3D11ClassInstance** classes, unsigned int& numInstances,
337  GpuProgramParametersSharedPtr params, uint16 variabilityMask);
338 
339  // Get slot for a specific interface
340  unsigned int getSubroutineSlot(const String& subroutineSlotName) const;
341 
342  void CreateVertexShader();
343  void CreatePixelShader();
344  void CreateGeometryShader();
345  void CreateDomainShader();
346  void CreateHullShader();
347  void CreateComputeShader();
348 
351  void loadFromSource(void);
352 
354 
355  void reinterpretGSForStreamOut(void);
357 
358  unsigned int getNumInputs(void)const;
359  unsigned int getNumOutputs(void)const;
360 
362 
363  const D3D11_SIGNATURE_PARAMETER_DESC & getInputParamDesc(unsigned int index) const;
364  const D3D11_SIGNATURE_PARAMETER_DESC & getOutputParamDesc(unsigned int index) const;
365  };
366 }
367 
368 #endif
Ogre::D3D11HLSLProgram::mVarDescBuffer
D3d11ShaderVariables mVarDescBuffer
Definition: OgreD3D11HLSLProgram.h:276
Ogre::D3D11HLSLProgram::CreateHullShader
void CreateHullShader()
Ogre::D3D11HLSLProgram::CmdColumnMajorMatrices
Command object for setting matrix packing in column-major order.
Definition: OgreD3D11HLSLProgram.h:73
Ogre::D3D11HLSLProgram::getInputVertexDeclaration
D3D11VertexDeclaration & getInputVertexDeclaration()
Definition: OgreD3D11HLSLProgram.h:353
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre::D3D11HLSLProgram::mColumnMajorMatrices
bool mColumnMajorMatrices
Definition: OgreD3D11HLSLProgram.h:111
INVALID_IDX
#define INVALID_IDX
Definition: OgreD3D11HLSLProgram.h:159
Ogre::D3D11HLSLProgram::msCmdColumnMajorMatrices
static CmdColumnMajorMatrices msCmdColumnMajorMatrices
Definition: OgreD3D11HLSLProgram.h:92
Ogre::D3D11HLSLProgram::ShaderVarWithPosInBuf::operator=
ShaderVarWithPosInBuf & operator=(const ShaderVarWithPosInBuf &var)
Definition: OgreD3D11HLSLProgram.h:138
Ogre::SharedPtr::setNull
void setNull(void)
Definition: OgreSharedPtr.h:277
Ogre::D3D11HLSLProgram::msCmdPreprocessorDefines
static CmdPreprocessorDefines msCmdPreprocessorDefines
Definition: OgreD3D11HLSLProgram.h:91
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::D3D11HLSLProgram::getVertexShader
ID3D11VertexShader * getVertexShader(void) const
Ogre::D3D11HLSLProgram::BufferInfoIterator
std::set< BufferInfo >::iterator BufferInfoIterator
Definition: OgreD3D11HLSLProgram.h:232
Ogre::D3D11HLSLProgram::getNameForMicrocodeCache
String getNameForMicrocodeCache()
Ogre::D3D11HLSLProgram::CmdEntryPoint
Command object for setting entry point.
Definition: OgreD3D11HLSLProgram.h:52
Ogre::D3D11HLSLProgram::getEntryPoint
const String & getEntryPoint(void) const
Gets the entry point defined for this program.
Definition: OgreD3D11HLSLProgram.h:295
Ogre::D3D11HLSLProgram::mMemberTypeName
MemberTypeNames mMemberTypeName
Definition: OgreD3D11HLSLProgram.h:280
Ogre::D3D11HLSLProgram::SlotIterator
std::map< std::string, unsigned int >::const_iterator SlotIterator
Definition: OgreD3D11HLSLProgram.h:238
Ogre::MicroCode
vector< byte >::type MicroCode
Definition: OgreD3D11HLSLProgram.h:38
Ogre::D3D11HLSLProgram::msCmdEnableBackwardsCompatibility
static CmdEnableBackwardsCompatibility msCmdEnableBackwardsCompatibility
Definition: OgreD3D11HLSLProgram.h:93
Ogre::D3D11HLSLProgram::D3d11ShaderBufferDescs
vector< D3D11_SHADER_BUFFER_DESC >::type D3d11ShaderBufferDescs
Definition: OgreD3D11HLSLProgram.h:262
Ogre::D3D11HLSLProgram::mD3d11ShaderVariableSubparts
D3d11ShaderVariableSubparts mD3d11ShaderVariableSubparts
Definition: OgreD3D11HLSLProgram.h:274
Ogre::D3D11HLSLProgram::D3d11ShaderVariableSubpartsIter
D3d11ShaderVariableSubparts::iterator D3d11ShaderVariableSubpartsIter
Definition: OgreD3D11HLSLProgram.h:253
Ogre::D3D11HLSLProgram::setTarget
void setTarget(const String &target)
Sets the shader target to compile down to, e.g.
OgreHighLevelGpuProgram.h
Ogre::D3D11HLSLProgram::getNumInputs
unsigned int getNumInputs(void) const
Ogre::D3D11HLSLProgram::CmdColumnMajorMatrices::doGet
String doGet(const void *target) const
Ogre::D3D11HLSLProgram::unloadHighLevelImpl
void unloadHighLevelImpl(void)
Internal unload implementation, must be implemented by subclasses.
Ogre::D3D11HLSLProgram::mNumSlots
UINT mNumSlots
Definition: OgreD3D11HLSLProgram.h:269
Ogre::D3D11HLSLProgram::CmdEnableBackwardsCompatibility::doSet
void doSet(void *target, const String &val)
Ogre::D3D11HLSLProgram::ShaderVarWithPosInBuf::name
String name
Definition: OgreD3D11HLSLProgram.h:134
Ogre::D3D11HLSLProgram::BufferInfo::mIdx
unsigned int mIdx
Definition: OgreD3D11HLSLProgram.h:163
Ogre::D3D11HLSLProgram::populateParameterNames
void populateParameterNames(GpuProgramParametersSharedPtr params)
Populate the passed parameters with name->index map, must be overridden.
Ogre::D3D11HLSLProgram::loadFromSource
void loadFromSource(void)
Internal load implementation, must be implemented by subclasses.
Ogre::D3D11HLSLProgram::BufferInfo::operator=
BufferInfo & operator=(const BufferInfo &info)
Definition: OgreD3D11HLSLProgram.h:187
Ogre::D3D11HLSLProgram::CreateVertexShader
void CreateVertexShader()
Ogre::D3D11HLSLProgram::CreateGeometryShader
void CreateGeometryShader()
Ogre::D3D11HLSLProgram::CmdPreprocessorDefines::doSet
void doSet(void *target, const String &val)
Ogre::D3D11HLSLProgram::getComputeShader
ID3D11ComputeShader * getComputeShader(void) const
Ogre::D3D11HLSLProgram::CmdEntryPoint::doSet
void doSet(void *target, const String &val)
Ogre::D3D11HLSLProgram::ShaderVarWithPosInBuf::startOffset
size_t startOffset
Definition: OgreD3D11HLSLProgram.h:136
Ogre::D3D11HLSLProgram::processParamElement
void processParamElement(String prefix, LPCSTR pName, ID3D11ShaderReflectionType *varRefType)
Ogre::D3D11HLSLProgram::D3d11ShaderVariablesIter
D3d11ShaderVariables::iterator D3d11ShaderVariablesIter
Definition: OgreD3D11HLSLProgram.h:246
Ogre::D3D11HLSLProgram::BufferInfo::mUniformBuffer
HardwareUniformBufferSharedPtr mUniformBuffer
Definition: OgreD3D11HLSLProgram.h:165
OgreHardwareUniformBuffer.h
Ogre::_StringHash
stdext::hash_compare< _StringBase, std::less< _StringBase > > _StringHash
Definition: OgreString.h:215
Ogre::uint16
unsigned short uint16
Definition: OgrePlatform.h:360
Ogre::D3D11HLSLProgram::getLanguage
const String & getLanguage(void) const
Overridden from GpuProgram.
Ogre::D3D11VertexDeclaration
Specialisation of VertexDeclaration for D3D11.
Definition: OgreD3D11VertexDeclaration.h:38
OgreD3D11VertexDeclaration.h
Ogre::D3D11HLSLProgram::BufferInfo::operator==
bool operator==(const BufferInfo &other) const
Definition: OgreD3D11HLSLProgram.h:202
Ogre::D3D11HLSLProgram::mShaderVars
ShaderVars mShaderVars
Definition: OgreD3D11HLSLProgram.h:270
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::D3D11HLSLProgram::mHullShader
ID3D11HullShader * mHullShader
Definition: OgreD3D11HLSLProgram.h:129
Ogre::D3D11HLSLProgram::MemberTypeNames
vector< MemberTypeName >::type MemberTypeNames
Definition: OgreD3D11HLSLProgram.h:265
Ogre::D3D11HLSLProgram::analizeMicrocode
void analizeMicrocode()
Ogre::D3D11HLSLProgram::getEnableBackwardsCompatibility
bool getEnableBackwardsCompatibility(void) const
Gets whether backwards compatibility is enabled.
Definition: OgreD3D11HLSLProgram.h:316
Ogre::D3D11HLSLProgram::BufferInfo::BufferInfo
BufferInfo()
Definition: OgreD3D11HLSLProgram.h:169
Ogre::D3D11HLSLProgram
Specialization of HighLevelGpuProgram to provide support for D3D11 High-Level Shader Language (HLSL).
Definition: OgreD3D11HLSLProgram.h:48
Ogre::D3D11HLSLProgram::shaderMacroSet
bool shaderMacroSet
Definition: OgreD3D11HLSLProgram.h:119
Ogre::D3D11HLSLProgram::getGeometryShader
ID3D11GeometryShader * getGeometryShader(void) const
Ogre::D3D11HLSLProgram::mDomainShader
ID3D11DomainShader * mDomainShader
Definition: OgreD3D11HLSLProgram.h:128
Ogre::D3D11HLSLProgram::setPreprocessorDefines
void setPreprocessorDefines(const String &defines)
Sets the preprocessor defines use to compile the program.
Definition: OgreD3D11HLSLProgram.h:306
Ogre::D3D11HLSLProgram::getMicroCode
const MicroCode & getMicroCode(void) const
Ogre::D3D11HLSLProgram::mEntryPoint
String mEntryPoint
Definition: OgreD3D11HLSLProgram.h:109
Ogre::D3D11HLSLProgram::mConstantBufferNr
UINT mConstantBufferNr
Definition: OgreD3D11HLSLProgram.h:268
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:79
Ogre::D3D11HLSLProgram::getOutputParamDesc
const D3D11_SIGNATURE_PARAMETER_DESC & getOutputParamDesc(unsigned int index) const
Ogre::D3D11HLSLProgram::CmdTarget
Command object for setting target assembler.
Definition: OgreD3D11HLSLProgram.h:59
Ogre::HardwareUniformBufferSharedPtr
Shared pointer implementation used to share uniform buffers.
Definition: OgreHardwareUniformBuffer.h:68
Ogre::D3D11HLSLProgram::CmdEnableBackwardsCompatibility
Command object for setting backwards compatibility.
Definition: OgreD3D11HLSLProgram.h:80
Ogre::D3D11Device
Definition: OgreD3D11Device.h:36
Ogre::D3D11HLSLProgram::mInputVertexDeclaration
D3D11VertexDeclaration mInputVertexDeclaration
Definition: OgreD3D11HLSLProgram.h:123
Ogre::D3D11HLSLProgram::CmdTarget::doGet
String doGet(const void *target) const
Ogre::D3D11HLSLProgram::setShaderMacros
void setShaderMacros(D3D_SHADER_MACRO *shaderMacros)
Sets shader macros created manually.
Ogre::D3D11HLSLProgram::getCompatibleTarget
const String & getCompatibleTarget(void) const
Gets the shader target promoted to the first compatible, e.g.
Ogre::D3D11HLSLProgram::buildConstantDefinitions
virtual void buildConstantDefinitions() const
Build the constant definition map, must be overridden.
Ogre::D3D11HLSLProgram::CmdEnableBackwardsCompatibility::doGet
String doGet(const void *target) const
Ogre::D3D11HLSLProgram::ShaderVarWithPosInBuf::size
size_t size
Definition: OgreD3D11HLSLProgram.h:135
Ogre::D3D11HLSLProgram::mSerStrings
vector< String * >::type mSerStrings
Definition: OgreD3D11HLSLProgram.h:260
Ogre::D3D11HLSLProgram::MemberTypeName
Definition: OgreD3D11HLSLProgram.h:255
OgreD3D11Prerequisites.h
Ogre::D3D11HLSLProgram::CreateComputeShader
void CreateComputeShader()
Ogre::D3D11HLSLProgram::createParameters
GpuProgramParametersSharedPtr createParameters(void)
Overridden from GpuProgram.
Ogre::D3D11HLSLProgram::mD3d11ShaderTypeDescs
D3d11ShaderTypeDescs mD3d11ShaderTypeDescs
Definition: OgreD3D11HLSLProgram.h:278
Ogre::D3D11HLSLProgram::BufferInfo::operator=
BufferInfo & operator=(const String &name)
Definition: OgreD3D11HLSLProgram.h:200
Ogre::D3D11HLSLProgram::ShaderVars
vector< ShaderVarWithPosInBuf >::type ShaderVars
Definition: OgreD3D11HLSLProgram.h:146
Ogre::D3D11HLSLProgram::GpuConstantDefinitionWithName
Definition: OgreD3D11HLSLProgram.h:248
Ogre::D3D11HLSLProgram::getInputParamDesc
const D3D11_SIGNATURE_PARAMETER_DESC & getInputParamDesc(unsigned int index) const
Ogre::D3D11HLSLProgram::mD3d11ShaderInputParameters
D3d11ShaderParameters mD3d11ShaderInputParameters
Definition: OgreD3D11HLSLProgram.h:271
Ogre::D3D11HLSLProgram::D3d11ShaderVariableSubparts
vector< GpuConstantDefinitionWithName >::type D3d11ShaderVariableSubparts
Definition: OgreD3D11HLSLProgram.h:252
Ogre::D3D11HLSLProgram::MemberTypeName::Name
LPCSTR Name
Definition: OgreD3D11HLSLProgram.h:257
Ogre::D3D11HLSLProgram::mMemberTypeDesc
D3d11ShaderTypeDescs mMemberTypeDesc
Definition: OgreD3D11HLSLProgram.h:279
Ogre::D3D11HLSLProgram::BufferInfo::mName
String mName
Definition: OgreD3D11HLSLProgram.h:164
Ogre::D3D11HLSLProgram::BufferInfo::BufferInfo
BufferInfo(unsigned int index, const String &name)
Definition: OgreD3D11HLSLProgram.h:170
Ogre::D3D11HLSLProgram::mComputeShader
ID3D11ComputeShader * mComputeShader
Definition: OgreD3D11HLSLProgram.h:130
Ogre::D3D11HLSLProgram::BufferInfo::mHash
static _StringHash mHash
Definition: OgreD3D11HLSLProgram.h:162
Ogre::D3D11HLSLProgram::ShaderVarsIter
ShaderVars::iterator ShaderVarsIter
Definition: OgreD3D11HLSLProgram.h:147
Ogre::D3D11HLSLProgram::CmdColumnMajorMatrices::doSet
void doSet(void *target, const String &val)
Ogre::D3D11HLSLProgram::getConstantBuffer
ID3D11Buffer * getConstantBuffer(GpuProgramParametersSharedPtr params, uint16 variabilityMask)
Ogre::D3D11HLSLProgram::getNumOutputs
unsigned int getNumOutputs(void) const
Ogre::D3D11HLSLProgram::mEnableBackwardsCompatibility
bool mEnableBackwardsCompatibility
Definition: OgreD3D11HLSLProgram.h:112
Ogre::D3D11HLSLProgram::getConstantBuffers
void getConstantBuffers(ID3D11Buffer **buffers, unsigned int &numBuffers, ID3D11ClassInstance **classes, unsigned int &numInstances, GpuProgramParametersSharedPtr params, uint16 variabilityMask)
Ogre::D3D11HLSLProgram::mD3d11ShaderOutputParameters
D3d11ShaderParameters mD3d11ShaderOutputParameters
Definition: OgreD3D11HLSLProgram.h:272
Ogre::D3D11HLSLProgram::~D3D11HLSLProgram
~D3D11HLSLProgram()
Ogre::D3D11HLSLProgram::mGeometryShader
ID3D11GeometryShader * mGeometryShader
Definition: OgreD3D11HLSLProgram.h:127
Ogre::D3D11HLSLProgram::msCmdEntryPoint
static CmdEntryPoint msCmdEntryPoint
Definition: OgreD3D11HLSLProgram.h:89
Ogre::D3D11HLSLProgram::createConstantBuffer
void createConstantBuffer(const UINT ByteWidth)
Ogre::ResourceManager
Defines a generic resource handler.
Definition: OgreResourceManager.h:122
Ogre::D3D11HLSLProgram::mConstantBuffer
ID3D11Buffer * mConstantBuffer
Definition: OgreD3D11HLSLProgram.h:116
Ogre::D3D11HLSLProgram::BufferInfo::operator<
bool operator<(const BufferInfo &other) const
Definition: OgreD3D11HLSLProgram.h:206
Ogre::D3D11HLSLProgram::mD3d11ShaderVariables
D3d11ShaderVariables mD3d11ShaderVariables
Definition: OgreD3D11HLSLProgram.h:273
Ogre::D3D11HLSLProgram::reinterpretGSForStreamOut
void reinterpretGSForStreamOut(void)
Ogre::D3D11HLSLProgram::mConstantBufferSize
UINT mConstantBufferSize
Definition: OgreD3D11HLSLProgram.h:267
Ogre::D3D11HLSLProgram::D3d11ShaderParametersIter
D3d11ShaderParameters::iterator D3d11ShaderParametersIter
Definition: OgreD3D11HLSLProgram.h:242
Ogre::D3D11HLSLProgram::D3d11ShaderTypeDescs
vector< D3D11_SHADER_TYPE_DESC >::type D3d11ShaderTypeDescs
Definition: OgreD3D11HLSLProgram.h:263
Ogre::SharedPtr< GpuProgramParameters >
Ogre::D3D11HLSLProgram::CmdPreprocessorDefines
Command object for setting macro defines.
Definition: OgreD3D11HLSLProgram.h:66
Ogre::D3D11HLSLProgram::mPixelShader
ID3D11PixelShader * mPixelShader
Definition: OgreD3D11HLSLProgram.h:126
Ogre::D3D11HLSLProgram::ShaderVarWithPosInBuf
Definition: OgreD3D11HLSLProgram.h:132
Ogre::D3D11HLSLProgram::D3D11HLSLProgram
D3D11HLSLProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::D3D11HLSLProgram::BufferInfo::mShaderVars
ShaderVars mShaderVars
Definition: OgreD3D11HLSLProgram.h:166
Ogre::D3D11HLSLProgram::fixVariableNameFromCg
void fixVariableNameFromCg(const ShaderVarWithPosInBuf &newVar)
Ogre::D3D11HLSLProgram::InterfaceSlots
vector< UINT >::type InterfaceSlots
Definition: OgreD3D11HLSLProgram.h:264
Ogre::D3D11HLSLProgram::CreatePixelShader
void CreatePixelShader()
Ogre::D3D11HLSLProgram::mPreprocessorDefines
String mPreprocessorDefines
Definition: OgreD3D11HLSLProgram.h:110
Ogre::D3D11HLSLProgram::mInterfaceSlots
InterfaceSlots mInterfaceSlots
Definition: OgreD3D11HLSLProgram.h:281
Ogre::D3D11HLSLProgram::setColumnMajorMatrices
void setColumnMajorMatrices(bool columnMajor)
Sets whether matrix packing in column-major order.
Definition: OgreD3D11HLSLProgram.h:310
Ogre::D3D11HLSLProgram::CmdPreprocessorDefines::doGet
String doGet(const void *target) const
Ogre::D3D11HLSLProgram::BufferInfo::BufferInfo
BufferInfo(unsigned int index)
Definition: OgreD3D11HLSLProgram.h:197
Ogre::D3D11HLSLProgram::mVarDescPointer
D3d11ShaderVariables mVarDescPointer
Definition: OgreD3D11HLSLProgram.h:277
Ogre::GpuConstantDefinition
Information about predefined program constants.
Definition: OgreGpuProgramParams.h:122
Ogre::D3D11HLSLProgram::getPixelShader
ID3D11PixelShader * getPixelShader(void) const
Ogre::D3D11HLSLProgram::populateDef
void populateDef(D3D11_SHADER_TYPE_DESC &d3dDesc, GpuConstantDefinition &def) const
Ogre::D3D11HLSLProgram::BufferInfo::operator=
BufferInfo & operator=(unsigned int index)
Definition: OgreD3D11HLSLProgram.h:199
Ogre::D3D11HLSLProgram::D3d11ShaderParameters
vector< D3D11_SIGNATURE_PARAMETER_DESC >::type D3d11ShaderParameters
Definition: OgreD3D11HLSLProgram.h:241
Ogre::D3D11HLSLProgram::mVertexShader
ID3D11VertexShader * mVertexShader
Definition: OgreD3D11HLSLProgram.h:125
Ogre::D3D11HLSLProgram::mSlotMap
SlotMap mSlotMap
Definition: OgreD3D11HLSLProgram.h:239
Ogre::D3D11HLSLProgram::msCmdTarget
static CmdTarget msCmdTarget
Definition: OgreD3D11HLSLProgram.h:90
Ogre::D3D11HLSLProgram::ShaderVarsConstIter
ShaderVars::const_iterator ShaderVarsConstIter
Definition: OgreD3D11HLSLProgram.h:148
Ogre::D3D11HLSLProgram::mDevice
D3D11Device & mDevice
Definition: OgreD3D11HLSLProgram.h:121
Ogre::D3D11HLSLProgram::CmdTarget::doSet
void doSet(void *target, const String &val)
Ogre::D3D11HLSLProgram::setEnableBackwardsCompatibility
void setEnableBackwardsCompatibility(bool enableBackwardsCompatibility)
Sets whether backwards compatibility is enabled.
Definition: OgreD3D11HLSLProgram.h:314
Ogre::D3D11HLSLProgram::mD3d11ShaderBufferDescs
D3d11ShaderBufferDescs mD3d11ShaderBufferDescs
Definition: OgreD3D11HLSLProgram.h:275
Ogre::D3D11HLSLProgram::CreateDomainShader
void CreateDomainShader()
Ogre::D3D11HLSLProgram::mMicroCode
MicroCode mMicroCode
Definition: OgreD3D11HLSLProgram.h:115
Ogre::D3D11HLSLProgram::getTarget
const String & getTarget(void) const
Gets the shader target to compile down to, e.g.
Definition: OgreD3D11HLSLProgram.h:299
Ogre::D3D11HLSLProgram::isSupported
bool isSupported(void) const
Overridden from GpuProgram.
Ogre::D3D11HLSLProgram::getPreprocessorDefines
const String & getPreprocessorDefines(void) const
Sets the preprocessor defines use to compile the program.
Definition: OgreD3D11HLSLProgram.h:308
Ogre::D3D11HLSLProgram::CmdEntryPoint::doGet
String doGet(const void *target) const
Ogre::D3D11HLSLProgram::mShaderMacros
D3D_SHADER_MACRO * mShaderMacros
Definition: OgreD3D11HLSLProgram.h:118
Ogre::vector
Definition: OgrePrerequisites.h:491
Ogre::D3D11HLSLProgram::mBufferInfoMap
BufferInfoMap mBufferInfoMap
Definition: OgreD3D11HLSLProgram.h:233
Ogre::D3D11HLSLProgram::mErrorsInCompile
bool mErrorsInCompile
Definition: OgreD3D11HLSLProgram.h:114
Ogre::ManualResourceLoader
Interface describing a manual resource loader.
Definition: OgreResource.h:514
Ogre::D3D11HLSLProgram::mTarget
String mTarget
Definition: OgreD3D11HLSLProgram.h:108
Ogre::D3D11HLSLProgram::getDomainShader
ID3D11DomainShader * getDomainShader(void) const
Ogre::D3D11HLSLProgram::GpuConstantDefinitionWithName::Name
LPCSTR Name
Definition: OgreD3D11HLSLProgram.h:250
Ogre::HighLevelGpuProgram
Abstract base class representing a high-level program (a vertex or fragment program).
Definition: OgreHighLevelGpuProgram.h:63
Ogre::D3D11HLSLProgram::D3d11ShaderVariables
vector< D3D11_SHADER_VARIABLE_DESC >::type D3d11ShaderVariables
Definition: OgreD3D11HLSLProgram.h:245
Ogre::D3D11HLSLProgram::getSubroutineSlot
unsigned int getSubroutineSlot(const String &subroutineSlotName) const
Ogre::D3D11HLSLProgram::SlotMap
std::map< std::string, unsigned int > SlotMap
Definition: OgreD3D11HLSLProgram.h:237
Ogre::D3D11HLSLProgram::setEntryPoint
void setEntryPoint(const String &entryPoint)
Sets the entry point for this program ie the first method called.
Definition: OgreD3D11HLSLProgram.h:293
Ogre::D3D11HLSLProgram::createLowLevelImpl
void createLowLevelImpl(void)
Internal method for creating an appropriate low-level program from this high-level program,...
Ogre::D3D11HLSLProgram::compileMicrocode
void compileMicrocode(void)
Ogre::D3D11HLSLProgram::BufferInfo
Definition: OgreD3D11HLSLProgram.h:160
Ogre::D3D11HLSLProgram::getHullShader
ID3D11HullShader * getHullShader(void) const
Ogre::D3D11HLSLProgram::getColumnMajorMatrices
bool getColumnMajorMatrices(void) const
Gets whether matrix packed in column-major order.
Definition: OgreD3D11HLSLProgram.h:312
Ogre::D3D11HLSLProgram::BufferInfoMap
std::set< BufferInfo > BufferInfoMap
Definition: OgreD3D11HLSLProgram.h:231
Ogre::D3D11HLSLProgram::BufferInfo::BufferInfo
BufferInfo(const BufferInfo &info)
Definition: OgreD3D11HLSLProgram.h:177
Ogre::D3D11HLSLProgram::BufferInfo::BufferInfo
BufferInfo(const String &name)
Definition: OgreD3D11HLSLProgram.h:198
Ogre::D3D11HLSLProgram::getMicrocodeFromCache
void getMicrocodeFromCache(void)
Ogre::D3D11HLSLProgram::mReinterpretingGS
bool mReinterpretingGS
Definition: OgreD3D11HLSLProgram.h:356

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15