Diligent Engine  v.2.4.g
ShaderVariableManagerD3D11.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019-2021 Diligent Graphics LLC
3  * Copyright 2015-2019 Egor Yusov
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * In no event and under no legal theory, whether in tort (including negligence),
18  * contract, or otherwise, unless required by applicable law (such as deliberate
19  * and grossly negligent acts) or agreed to in writing, shall any Contributor be
20  * liable for any damages, including any direct, indirect, special, incidental,
21  * or consequential damages of any character arising as a result of this License or
22  * out of the use or inability to use the software (including but not limited to damages
23  * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
24  * all other commercial damages or losses), even if such Contributor has been advised
25  * of the possibility of such damages.
26  */
27 
28 #pragma once
29 
32 
33 #include "ShaderResources.hpp"
38 
39 namespace Diligent
40 {
41 
43 // sizeof(ShaderVariableManagerD3D11) == 48, (Release, x64)
45 {
46 public:
48  ShaderResourceCacheD3D11& ResourceCache) noexcept :
49  m_Owner{Owner},
50  m_ResourceCache{ResourceCache}
51  {
52  }
53 
55 
56  void Destroy(IMemoryAllocator& Allocator);
57 
58  // clang-format off
59  // No copies, only moves are allowed
64  // clang-format on
65 
66  void Initialize(const PipelineResourceSignatureD3D11Impl& Signature,
67  IMemoryAllocator& Allocator,
68  const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
69  Uint32 NumAllowedTypes,
71 
72  static size_t GetRequiredMemorySize(const PipelineResourceSignatureD3D11Impl& Signature,
73  const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
74  Uint32 NumAllowedTypes,
76 
78 
79  const PipelineResourceDesc& GetResourceDesc(Uint32 Index) const;
80  const ResourceAttribs& GetAttribs(Uint32 Index) const;
81 
82 
83  template <typename ThisImplType, D3D11_RESOURCE_RANGE ResRange>
84  struct ShaderVariableD3D11Base : ShaderVariableBase<ThisImplType, ShaderVariableManagerD3D11, IShaderResourceVariableD3D>
85  {
86  public:
88  ShaderVariableBase<ThisImplType, ShaderVariableManagerD3D11, IShaderResourceVariableD3D>{ParentLayout, ResIndex}
89  {}
90 
91  // clang-format off
96  // clang-format on
97 
100 
101  virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
102  {
103  if (ppInterface == nullptr)
104  return;
105 
106  *ppInterface = nullptr;
107  if (IID == IID_ShaderResourceVariableD3D || IID == IID_ShaderResourceVariable || IID == IID_Unknown)
108  {
109  *ppInterface = this;
110  (*ppInterface)->AddRef();
111  }
112  }
113 
114  virtual void DILIGENT_CALL_TYPE GetHLSLResourceDesc(HLSLShaderResourceDesc& HLSLResDesc) const override final
115  {
116  GetResourceDesc(HLSLResDesc);
117  HLSLResDesc.ShaderRegister = GetAttribs().BindPoints[m_ParentManager.m_ShaderTypeIndex];
118  }
119 
120  virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
121  {
122  VERIFY_EXPR(ArrayIndex < GetDesc().ArraySize);
123  return m_ParentManager.m_ResourceCache.IsResourceBound<ResRange>(GetAttribs().BindPoints + ArrayIndex);
124  }
125  };
126 
127  struct ConstBuffBindInfo final : ShaderVariableD3D11Base<ConstBuffBindInfo, D3D11_RESOURCE_RANGE_CBV>
128  {
131  {}
132 
133  __forceinline void BindResource(IDeviceObject* pObj, Uint32 ArrayIndex);
134  };
135 
136  struct TexSRVBindInfo final : ShaderVariableD3D11Base<TexSRVBindInfo, D3D11_RESOURCE_RANGE_SRV>
137  {
140  {}
141 
142  __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
143  };
144 
145  struct TexUAVBindInfo final : ShaderVariableD3D11Base<TexUAVBindInfo, D3D11_RESOURCE_RANGE_UAV>
146  {
149  {}
150 
151  __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
152  };
153 
154  struct BuffUAVBindInfo final : ShaderVariableD3D11Base<BuffUAVBindInfo, D3D11_RESOURCE_RANGE_UAV>
155  {
158  {}
159 
160  __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
161  };
162 
163  struct BuffSRVBindInfo final : ShaderVariableD3D11Base<BuffSRVBindInfo, D3D11_RESOURCE_RANGE_SRV>
164  {
167  {}
168 
169  __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
170  };
171 
172  struct SamplerBindInfo final : ShaderVariableD3D11Base<SamplerBindInfo, D3D11_RESOURCE_RANGE_SAMPLER>
173  {
176  {}
177 
178  __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
179  };
180 
181  void BindResources(IResourceMapping* pResourceMapping, Uint32 Flags);
182 
183  IShaderResourceVariable* GetVariable(const Char* Name) const;
184  IShaderResourceVariable* GetVariable(Uint32 Index) const;
185 
186  IObject& GetOwner() { return m_Owner; }
187 
188  Uint32 GetVariableCount() const;
189 
190  Uint32 GetVariableIndex(const IShaderResourceVariable& Variable) const;
191 
192  // clang-format off
193  Uint32 GetNumCBs() const { return (m_TexSRVsOffset - 0 ) / sizeof(ConstBuffBindInfo);}
194  Uint32 GetNumTexSRVs() const { return (m_TexUAVsOffset - m_TexSRVsOffset ) / sizeof(TexSRVBindInfo); }
195  Uint32 GetNumTexUAVs() const { return (m_BuffSRVsOffset - m_TexUAVsOffset ) / sizeof(TexUAVBindInfo) ; }
196  Uint32 GetNumBufSRVs() const { return (m_BuffUAVsOffset - m_BuffSRVsOffset) / sizeof(BuffSRVBindInfo); }
197  Uint32 GetNumBufUAVs() const { return (m_SamplerOffset - m_BuffUAVsOffset) / sizeof(BuffUAVBindInfo); }
198  Uint32 GetNumSamplers() const { return (m_MemorySize - m_SamplerOffset ) / sizeof(SamplerBindInfo); }
199 
200  template<typename ResourceType> Uint32 GetNumResources()const;
201  template<> Uint32 GetNumResources<ConstBuffBindInfo>() const { return GetNumCBs(); }
202  template<> Uint32 GetNumResources<TexSRVBindInfo> () const { return GetNumTexSRVs(); }
203  template<> Uint32 GetNumResources<TexUAVBindInfo> () const { return GetNumTexUAVs(); }
204  template<> Uint32 GetNumResources<BuffSRVBindInfo> () const { return GetNumBufSRVs(); }
205  template<> Uint32 GetNumResources<BuffUAVBindInfo> () const { return GetNumBufUAVs(); }
206  template<> Uint32 GetNumResources<SamplerBindInfo> () const { return GetNumSamplers(); }
207  // clang-format on
208 
209 private:
210  static D3DShaderResourceCounters CountResources(
211  const PipelineResourceSignatureD3D11Impl& Signature,
212  const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
213  Uint32 NumAllowedTypes,
215 
216  // clang-format off
217  using OffsetType = Uint16;
218  template<typename ResourceType> OffsetType GetResourceOffset()const;
219  template<> OffsetType GetResourceOffset<ConstBuffBindInfo>() const { return 0; }
220  template<> OffsetType GetResourceOffset<TexSRVBindInfo> () const { return m_TexSRVsOffset; }
221  template<> OffsetType GetResourceOffset<TexUAVBindInfo> () const { return m_TexUAVsOffset; }
222  template<> OffsetType GetResourceOffset<BuffSRVBindInfo> () const { return m_BuffSRVsOffset; }
223  template<> OffsetType GetResourceOffset<BuffUAVBindInfo> () const { return m_BuffUAVsOffset; }
224  template<> OffsetType GetResourceOffset<SamplerBindInfo> () const { return m_SamplerOffset; }
225  // clang-format on
226 
227  template <typename ResourceType>
228  ResourceType& GetResource(Uint32 ResIndex) const
229  {
230  VERIFY(ResIndex < GetNumResources<ResourceType>(), "Resource index (", ResIndex, ") must be less than (", GetNumResources<ResourceType>(), ")");
231  auto Offset = GetResourceOffset<ResourceType>();
232  return reinterpret_cast<ResourceType*>(reinterpret_cast<Uint8*>(m_ResourceBuffer) + Offset)[ResIndex];
233  }
234 
235  template <typename ResourceType>
236  const ResourceType& GetConstResource(Uint32 ResIndex) const
237  {
238  VERIFY(ResIndex < GetNumResources<ResourceType>(), "Resource index (", ResIndex, ") must be less than (", GetNumResources<ResourceType>(), ")");
239  auto Offset = GetResourceOffset<ResourceType>();
240  return reinterpret_cast<const ResourceType*>(reinterpret_cast<const Uint8*>(m_ResourceBuffer) + Offset)[ResIndex];
241  }
242 
243  template <typename ResourceType>
244  IShaderResourceVariable* GetResourceByName(const Char* Name) const;
245 
246  template <typename THandleCB,
247  typename THandleTexSRV,
248  typename THandleTexUAV,
249  typename THandleBufSRV,
250  typename THandleBufUAV,
251  typename THandleSampler>
252  void HandleResources(THandleCB HandleCB,
253  THandleTexSRV HandleTexSRV,
254  THandleTexUAV HandleTexUAV,
255  THandleBufSRV HandleBufSRV,
256  THandleBufUAV HandleBufUAV,
257  THandleSampler HandleSampler)
258  {
259  for (Uint32 cb = 0; cb < GetNumResources<ConstBuffBindInfo>(); ++cb)
260  HandleCB(GetResource<ConstBuffBindInfo>(cb));
261 
262  for (Uint32 t = 0; t < GetNumResources<TexSRVBindInfo>(); ++t)
263  HandleTexSRV(GetResource<TexSRVBindInfo>(t));
264 
265  for (Uint32 u = 0; u < GetNumResources<TexUAVBindInfo>(); ++u)
266  HandleTexUAV(GetResource<TexUAVBindInfo>(u));
267 
268  for (Uint32 s = 0; s < GetNumResources<BuffSRVBindInfo>(); ++s)
269  HandleBufSRV(GetResource<BuffSRVBindInfo>(s));
270 
271  for (Uint32 u = 0; u < GetNumResources<BuffUAVBindInfo>(); ++u)
272  HandleBufUAV(GetResource<BuffUAVBindInfo>(u));
273 
274  for (Uint32 s = 0; s < GetNumResources<SamplerBindInfo>(); ++s)
275  HandleSampler(GetResource<SamplerBindInfo>(s));
276  }
277 
278  template <typename THandleCB,
279  typename THandleTexSRV,
280  typename THandleTexUAV,
281  typename THandleBufSRV,
282  typename THandleBufUAV,
283  typename THandleSampler>
284  void HandleConstResources(THandleCB HandleCB,
285  THandleTexSRV HandleTexSRV,
286  THandleTexUAV HandleTexUAV,
287  THandleBufSRV HandleBufSRV,
288  THandleBufUAV HandleBufUAV,
289  THandleSampler HandleSampler) const
290  {
291  for (Uint32 cb = 0; cb < GetNumResources<ConstBuffBindInfo>(); ++cb)
292  HandleCB(GetConstResource<ConstBuffBindInfo>(cb));
293 
294  for (Uint32 t = 0; t < GetNumResources<TexSRVBindInfo>(); ++t)
295  HandleTexSRV(GetConstResource<TexSRVBindInfo>(t));
296 
297  for (Uint32 u = 0; u < GetNumResources<TexUAVBindInfo>(); ++u)
298  HandleTexUAV(GetConstResource<TexUAVBindInfo>(u));
299 
300  for (Uint32 s = 0; s < GetNumResources<BuffSRVBindInfo>(); ++s)
301  HandleBufSRV(GetConstResource<BuffSRVBindInfo>(s));
302 
303  for (Uint32 u = 0; u < GetNumResources<BuffUAVBindInfo>(); ++u)
304  HandleBufUAV(GetConstResource<BuffUAVBindInfo>(u));
305 
306  for (Uint32 s = 0; s < GetNumResources<SamplerBindInfo>(); ++s)
307  HandleSampler(GetConstResource<SamplerBindInfo>(s));
308  }
309 
310  void SetSampler(Uint32 ResIdx, class SamplerD3D11Impl* pSamplerD3D11, Uint32 ArrayIndex);
311 
313  friend class ShaderVariableLocator;
314 
315 private:
316  PipelineResourceSignatureD3D11Impl const* m_pSignature = nullptr;
317 
318  IObject& m_Owner;
319 
320  // No need to use shared pointer, as the resource cache is either part of the same
321  // PipelineResourceSignatureD3D11Impl object, or ShaderResourceBindingD3D11Impl object.
322  ShaderResourceCacheD3D11& m_ResourceCache;
323  void* m_ResourceBuffer = nullptr;
324 
325  // Offsets in bytes
326  OffsetType m_TexSRVsOffset = 0;
327  OffsetType m_TexUAVsOffset = 0;
328  OffsetType m_BuffSRVsOffset = 0;
329  OffsetType m_BuffUAVsOffset = 0;
330  OffsetType m_SamplerOffset = 0;
331  OffsetType m_MemorySize = 0;
332 
333  Uint8 m_ShaderTypeIndex = 0;
334 
335 #ifdef DILIGENT_DEBUG
336  IMemoryAllocator* m_pDbgAllocator = nullptr;
337 #endif
338 };
339 
340 } // namespace Diligent
Diligent::ShaderVariableManagerD3D11::TexUAVBindInfo::BindResource
__forceinline void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerD3D11.cpp:427
Diligent::D3DShaderResourceCounters
Definition: D3DShaderResourceLoader.hpp:43
Diligent::PipelineResourceAttribsD3D11
Definition: PipelineResourceAttribsD3D11.hpp:275
Diligent::ShaderVariableBase
Base implementation of a shader variable.
Definition: ShaderResourceVariableBase.hpp:524
Diligent::IShaderResourceVariable
Shader resource variable.
Definition: ShaderResourceVariable.h:117
Diligent::Char
char Char
Definition: BasicTypes.h:64
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::ShaderVariableD3D11Base
ShaderVariableD3D11Base(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:87
Diligent::ShaderVariableManagerD3D11::TexSRVBindInfo::BindResource
__forceinline void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerD3D11.cpp:305
Diligent::ShaderVariableManagerD3D11::TexUAVBindInfo::TexUAVBindInfo
TexUAVBindInfo(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:147
Diligent::SHADER_TYPE
SHADER_TYPE
Describes the shader type.
Definition: GraphicsTypes.h:65
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::QueryInterface
virtual void QueryInterface(const INTERFACE_ID &IID, IObject **ppInterface) override final
Definition: ShaderVariableManagerD3D11.hpp:101
Flags
Uint32 Flags
Definition: DXBCUtils.cpp:71
Diligent::ShaderVariableManagerD3D11::ConstBuffBindInfo
Definition: ShaderVariableManagerD3D11.hpp:127
Diligent::IObject
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
Diligent::HLSLShaderResourceDesc
HLSL resource description.
Definition: ShaderD3D.h:46
Diligent::ShaderVariableManagerD3D11::BuffUAVBindInfo
Definition: ShaderVariableManagerD3D11.hpp:154
Diligent::ShaderVariableManagerD3D11::Initialize
void Initialize(const PipelineResourceSignatureD3D11Impl &Signature, IMemoryAllocator &Allocator, const SHADER_RESOURCE_VARIABLE_TYPE *AllowedVarTypes, Uint32 NumAllowedTypes, SHADER_TYPE ShaderType)
Definition: ShaderVariableManagerD3D11.cpp:168
ShaderResourceVariableBase.hpp
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base
Definition: ShaderVariableManagerD3D11.hpp:84
Diligent::ShaderVariableManagerD3D11::BuffSRVBindInfo::BuffSRVBindInfo
BuffSRVBindInfo(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:165
Diligent::D3D11_RESOURCE_RANGE_SAMPLER
@ D3D11_RESOURCE_RANGE_SAMPLER
Definition: PipelineResourceAttribsD3D11.hpp:47
Diligent::ShaderVariableManagerD3D11::Destroy
void Destroy(IMemoryAllocator &Allocator)
Definition: ShaderVariableManagerD3D11.cpp:75
Diligent::D3D11_RESOURCE_RANGE_SRV
@ D3D11_RESOURCE_RANGE_SRV
Definition: PipelineResourceAttribsD3D11.hpp:46
Diligent::ShaderVariableManagerD3D11::BuffUAVBindInfo::BindResource
__forceinline void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerD3D11.cpp:451
ShaderResources.hpp
Diligent::ShaderVariableLocator
Definition: ShaderVariableManagerD3D11.cpp:627
Diligent::D3D11_RESOURCE_RANGE_CBV
@ D3D11_RESOURCE_RANGE_CBV
Definition: PipelineResourceAttribsD3D11.hpp:45
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::operator=
ShaderVariableD3D11Base & operator=(const ShaderVariableD3D11Base &)=delete
Diligent::ShaderVariableManagerD3D11::GetNumTexUAVs
Uint32 GetNumTexUAVs() const
Definition: ShaderVariableManagerD3D11.hpp:195
Diligent::IDeviceObject
Base interface for all objects created by the render device Diligent::IRenderDevice.
Definition: DeviceObject.h:52
Diligent::ShaderVariableManagerD3D11::BuffUAVBindInfo::BuffUAVBindInfo
BuffUAVBindInfo(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:156
Diligent::INTERFACE_ID
Unique interface identifier.
Definition: InterfaceID.h:37
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::IsBound
virtual bool IsBound(Uint32 ArrayIndex) const override final
Definition: ShaderVariableManagerD3D11.hpp:120
Diligent::ShaderVariableManagerD3D11::GetVariableIndex
Uint32 GetVariableIndex(const IShaderResourceVariable &Variable) const
Definition: ShaderVariableManagerD3D11.cpp:593
Diligent::ShaderVariableManagerD3D11::GetNumBufSRVs
Uint32 GetNumBufSRVs() const
Definition: ShaderVariableManagerD3D11.hpp:196
Diligent::ShaderVariableManagerD3D11::GetAttribs
const ResourceAttribs & GetAttribs(Uint32 Index) const
Definition: ShaderVariableManagerD3D11.cpp:113
Diligent::PipelineResourceAttribsD3D11::BindPoints
D3D11ResourceBindPoints BindPoints
Definition: PipelineResourceAttribsD3D11.hpp:288
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::GetDesc
const PipelineResourceDesc & GetDesc() const
Definition: ShaderVariableManagerD3D11.hpp:98
Diligent::ShaderVariableIndexLocator
Definition: ShaderVariableManagerD3D11.cpp:548
Diligent::ShaderVariableManagerD3D11::GetNumSamplers
Uint32 GetNumSamplers() const
Definition: ShaderVariableManagerD3D11.hpp:198
PipelineResourceAttribsD3D11.hpp
Diligent::ShaderVariableManagerD3D11::BindResources
void BindResources(IResourceMapping *pResourceMapping, Uint32 Flags)
Definition: ShaderVariableManagerD3D11.cpp:475
Diligent::ShaderVariableManagerD3D11::GetRequiredMemorySize
static size_t GetRequiredMemorySize(const PipelineResourceSignatureD3D11Impl &Signature, const SHADER_RESOURCE_VARIABLE_TYPE *AllowedVarTypes, Uint32 NumAllowedTypes, SHADER_TYPE ShaderType)
Definition: ShaderVariableManagerD3D11.cpp:150
DILIGENT_CALL_TYPE
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
Diligent::ShaderVariableManagerD3D11::GetNumTexSRVs
Uint32 GetNumTexSRVs() const
Definition: ShaderVariableManagerD3D11.hpp:194
Diligent::ShaderVariableManagerD3D11::~ShaderVariableManagerD3D11
~ShaderVariableManagerD3D11()
Definition: ShaderVariableManagerD3D11.cpp:70
Diligent::PipelineResourceDesc
Pipeline resource description.
Definition: PipelineResourceSignature.h:120
Diligent::Uint32
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Diligent::ShaderVariableBase< ThisImplType, ShaderVariableManagerD3D11, IShaderResourceVariableD3D >::GetResourceDesc
virtual void GetResourceDesc(ShaderResourceDesc &ResourceDesc) const override final
Definition: ShaderResourceVariableBase.hpp:580
Diligent::ShaderVariableManagerD3D11::SamplerBindInfo::BindResource
__forceinline void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerD3D11.cpp:380
Diligent::ShaderVariableManagerD3D11::GetNumResources
Uint32 GetNumResources() const
Diligent::ShaderVariableManagerD3D11::TexUAVBindInfo
Definition: ShaderVariableManagerD3D11.hpp:145
Diligent::ShaderVariableManagerD3D11::GetVariableCount
Uint32 GetVariableCount() const
Definition: ShaderVariableManagerD3D11.cpp:694
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::GetAttribs
const ResourceAttribs & GetAttribs() const
Definition: ShaderVariableManagerD3D11.hpp:99
Diligent::ShaderResourceCacheD3D11
The class implements a cache that holds resources bound to all shader stages.
Definition: ShaderResourceCacheD3D11.hpp:58
Diligent::ShaderVariableManagerD3D11::TexSRVBindInfo::TexSRVBindInfo
TexSRVBindInfo(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:138
ShaderResourceVariableD3D.h
Diligent::ShaderVariableManagerD3D11::operator=
ShaderVariableManagerD3D11 & operator=(const ShaderVariableManagerD3D11 &)=delete
Diligent::IMemoryAllocator
Base interface for a raw memory allocator.
Definition: MemoryAllocator.h:41
Diligent::PipelineResourceSignatureD3D11Impl
Implementation of the Diligent::PipelineResourceSignatureD3D11Impl class.
Definition: PipelineResourceSignatureD3D11Impl.hpp:52
Diligent::ShaderVariableManagerD3D11::BuffSRVBindInfo::BindResource
__forceinline void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerD3D11.cpp:402
Diligent::D3D11_RESOURCE_RANGE_UAV
@ D3D11_RESOURCE_RANGE_UAV
Definition: PipelineResourceAttribsD3D11.hpp:48
Diligent::ShaderVariableManagerD3D11::SamplerBindInfo::SamplerBindInfo
SamplerBindInfo(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:174
Diligent::Uint16
uint16_t Uint16
16-bit unsigned integer
Definition: BasicTypes.h:52
Diligent::ShaderResourceCacheD3D11::IsResourceBound
__forceinline bool IsResourceBound(const D3D11ResourceBindPoints &BindPoints) const
Definition: ShaderResourceCacheD3D11.hpp:233
Diligent::IShaderResourceVariableD3D
Interface to the Direct3D ShaderResourceVariable resource variable.
Definition: ShaderResourceVariableD3D.h:45
Diligent::Uint8
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
Diligent::ShaderVariableBase< ThisImplType, ShaderVariableManagerD3D11, IShaderResourceVariableD3D >::m_ResIndex
const Uint32 m_ResIndex
Definition: ShaderResourceVariableBase.hpp:633
ShaderResourceCacheD3D11.hpp
VERIFY_EXPR
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
Diligent::ShaderVariableManagerD3D11::ShaderVariableManagerD3D11
ShaderVariableManagerD3D11(IObject &Owner, ShaderResourceCacheD3D11 &ResourceCache) noexcept
Definition: ShaderVariableManagerD3D11.hpp:47
Diligent::ShaderVariableManagerD3D11::GetVariable
IShaderResourceVariable * GetVariable(const Char *Name) const
Definition: ShaderVariableManagerD3D11.cpp:521
VERIFY
#define VERIFY(...)
Definition: DebugUtilities.hpp:76
Diligent::ShaderVariableManagerD3D11::ConstBuffBindInfo::BindResource
__forceinline void BindResource(IDeviceObject *pObj, Uint32 ArrayIndex)
Definition: ShaderVariableManagerD3D11.cpp:283
ShaderType
Uint16 ShaderType
Definition: DXBCUtils.cpp:70
Diligent::ShaderVariableManagerD3D11::BuffSRVBindInfo
Definition: ShaderVariableManagerD3D11.hpp:163
Diligent::ShaderVariableManagerD3D11::ShaderVariableD3D11Base::GetHLSLResourceDesc
virtual void GetHLSLResourceDesc(HLSLShaderResourceDesc &HLSLResDesc) const override final
Definition: ShaderVariableManagerD3D11.hpp:114
Diligent::ShaderVariableManagerD3D11::ConstBuffBindInfo::ConstBuffBindInfo
ConstBuffBindInfo(ShaderVariableManagerD3D11 &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerD3D11.hpp:129
Diligent::ShaderVariableManagerD3D11::GetResourceDesc
const PipelineResourceDesc & GetResourceDesc(Uint32 Index) const
Definition: ShaderVariableManagerD3D11.cpp:107
Diligent::ShaderVariableManagerD3D11
Diligent::ShaderVariableManagerD3D11 class.
Definition: ShaderVariableManagerD3D11.hpp:44
Diligent::ShaderVariableManagerD3D11::TexSRVBindInfo
Definition: ShaderVariableManagerD3D11.hpp:136
Diligent::ShaderVariableManagerD3D11::GetNumCBs
Uint32 GetNumCBs() const
Definition: ShaderVariableManagerD3D11.hpp:193
Diligent::ShaderVariableBase< ThisImplType, ShaderVariableManagerD3D11, IShaderResourceVariableD3D >::m_ParentManager
ShaderVariableManagerD3D11 & m_ParentManager
Definition: ShaderResourceVariableBase.hpp:630
Diligent
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
Diligent::ShaderVariableManagerD3D11::SamplerBindInfo
Definition: ShaderVariableManagerD3D11.hpp:172
Diligent::ShaderVariableManagerD3D11::GetOwner
IObject & GetOwner()
Definition: ShaderVariableManagerD3D11.hpp:186
Diligent::SHADER_RESOURCE_VARIABLE_TYPE
SHADER_RESOURCE_VARIABLE_TYPE
Describes the type of the shader resource variable.
Definition: ShaderResourceVariable.h:48
Diligent::ShaderVariableManagerD3D11::GetNumBufUAVs
Uint32 GetNumBufUAVs() const
Definition: ShaderVariableManagerD3D11.hpp:197