Diligent Engine  v.2.4.g
ShaderVariableManagerGL.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 
30 // ShaderVariableManagerGL class manages static resources of a pipeline resource signature, and
31 // all types of resources for an SRB.
32 
33 //
34 // .-==========================-. _______________________________________________________________________________________________________________
35 // || || | | | | | | | | | | |
36 // __|| ShaderVariableManagerGL ||------------>| UBInfo[0] | UBInfo[1] | ... | TexInfo[0] | TexInfo[1] | ... | ImgInfo[0] | ... | SSBO[0] | ... |
37 // | || || |___________|___________|_______|____________|____________|_______|____________|_________|___________|__________|
38 // | '-==========================-' / \ |
39 // | | m_ResIndex m_ResIndex m_ResIndex
40 // | m_pSignature / \ |
41 // | _____________V___________________ ________V________________________________V___________________________V__________________________________________
42 // | | | | | | | | | | | | | | | |
43 // | | PipelineResourceSignatureGLImpl |------>| UB[0] | UB[1] | ... | Tex[0] | Tex[1] | ... | Img[0] | Img[1] | ... | SSBOs[0] | SSBOs[1] | ... |
44 // | |_________________________________| |__________|__________|_______|________|________|_______|________|________|_______|__________|__________|_______|
45 // | | | | | | | | |
46 // m_ResourceCache Binding Binding Binding Binding Binding Binding Binding Binding
47 // | | | | | | | | |
48 // | _______________________ ____V___________V________________V_________V________________V________V________________V___________V_____________
49 // | | | | | | | |
50 // '-->| ShaderResourceCacheGL |-------- --->| Uinform Buffers | Textures | Images | Storge Buffers |
51 // |_______________________| |___________________________|___________________________|___________________________|___________________________|
52 //
53 
54 #include <array>
55 
56 #include "Object.h"
60 
61 namespace Diligent
62 {
63 
64 class PipelineResourceSignatureGLImpl;
65 
66 // sizeof(ShaderVariableManagerGL) == 40 (x64, msvc, Release)
68 {
69 public:
70  ShaderVariableManagerGL(IObject& Owner, ShaderResourceCacheGL& ResourceCache) noexcept :
71  m_Owner(Owner),
72  m_ResourceCache{ResourceCache}
73  {}
74 
76 
77  void Destroy(IMemoryAllocator& Allocator);
78 
79  // No copies, only moves are allowed
80  // clang-format off
85  // clang-format on
86 
87  void Initialize(const PipelineResourceSignatureGLImpl& Signature,
88  IMemoryAllocator& Allocator,
89  const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
90  Uint32 NumAllowedTypes,
92 
93  static size_t GetRequiredMemorySize(const PipelineResourceSignatureGLImpl& Signature,
94  const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
95  Uint32 NumAllowedTypes,
97 
99 
100  // These two methods can't be implemented in the header because they depend on PipelineResourceSignatureGLImpl
101  const PipelineResourceDesc& GetResourceDesc(Uint32 Index) const;
102  const ResourceAttribs& GetResourceAttribs(Uint32 Index) const;
103 
104  template <typename ThisImplType>
105  struct GLVariableBase : public ShaderVariableBase<ThisImplType, ShaderVariableManagerGL>
106  {
107  public:
108  GLVariableBase(ShaderVariableManagerGL& ParentLayout, Uint32 ResIndex) :
109  ShaderVariableBase<ThisImplType, ShaderVariableManagerGL>{ParentLayout, ResIndex}
110  {}
111 
113  };
114 
115 
116  struct UniformBuffBindInfo final : GLVariableBase<UniformBuffBindInfo>
117  {
119  GLVariableBase<UniformBuffBindInfo>{ParentLayout, ResIndex}
120  {}
121 
122  void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
123 
124  virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
125  {
126  VERIFY_EXPR(ArrayIndex < GetDesc().ArraySize);
127  return m_ParentManager.m_ResourceCache.IsUBBound(GetAttribs().CacheOffset + ArrayIndex);
128  }
129  };
130 
131 
132  struct TextureBindInfo final : GLVariableBase<TextureBindInfo>
133  {
134  TextureBindInfo(ShaderVariableManagerGL& ParentLayout, Uint32 ResIndex) :
135  GLVariableBase<TextureBindInfo>{ParentLayout, ResIndex}
136  {}
137 
138  void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
139 
140  virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
141  {
142  const auto& Desc = GetDesc();
143  VERIFY_EXPR(ArrayIndex < Desc.ArraySize);
144  const bool IsTexView = (Desc.ResourceType == SHADER_RESOURCE_TYPE_TEXTURE_SRV || Desc.ResourceType == SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT);
145  return m_ParentManager.m_ResourceCache.IsTextureBound(GetAttribs().CacheOffset + ArrayIndex, IsTexView);
146  }
147  };
148 
149 
150  struct ImageBindInfo final : GLVariableBase<ImageBindInfo>
151  {
152  ImageBindInfo(ShaderVariableManagerGL& ParentLayout, Uint32 ResIndex) :
153  GLVariableBase<ImageBindInfo>{ParentLayout, ResIndex}
154  {}
155 
156  void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
157 
158  virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
159  {
160  const auto& Desc = GetDesc();
161  VERIFY_EXPR(ArrayIndex < Desc.ArraySize);
162  const bool IsImgView = (Desc.ResourceType == SHADER_RESOURCE_TYPE_TEXTURE_SRV || Desc.ResourceType == SHADER_RESOURCE_TYPE_TEXTURE_UAV);
163  return m_ParentManager.m_ResourceCache.IsImageBound(GetAttribs().CacheOffset + ArrayIndex, IsImgView);
164  }
165  };
166 
167 
168  struct StorageBufferBindInfo final : GLVariableBase<StorageBufferBindInfo>
169  {
171  GLVariableBase<StorageBufferBindInfo>{ParentLayout, ResIndex}
172  {}
173 
174  void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
175 
176  virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
177  {
178  VERIFY_EXPR(ArrayIndex < GetDesc().ArraySize);
179  return m_ParentManager.m_ResourceCache.IsSSBOBound(GetAttribs().CacheOffset + ArrayIndex);
180  }
181  };
182 
183  void BindResources(IResourceMapping* pResourceMapping, Uint32 Flags);
184 
185  IShaderResourceVariable* GetVariable(const Char* Name) const;
187 
188  IObject& GetOwner() { return m_Owner; }
189 
191  {
193  }
194 
195  // clang-format off
196  Uint32 GetNumUBs() const { return (m_TextureOffset - m_UBOffset) / sizeof(UniformBuffBindInfo); }
197  Uint32 GetNumTextures() const { return (m_ImageOffset - m_TextureOffset) / sizeof(TextureBindInfo); }
198  Uint32 GetNumImages() const { return (m_StorageBufferOffset - m_ImageOffset) / sizeof(ImageBindInfo) ; }
199  Uint32 GetNumStorageBuffers() const { return (m_VariableEndOffset - m_StorageBufferOffset) / sizeof(StorageBufferBindInfo); }
200  // clang-format on
201 
202  template <typename ResourceType> Uint32 GetNumResources() const;
203 
204  template <typename ResourceType>
205  const ResourceType& GetConstResource(Uint32 ResIndex) const
206  {
207  VERIFY(ResIndex < GetNumResources<ResourceType>(), "Resource index (", ResIndex, ") exceeds max allowed value (", GetNumResources<ResourceType>(), ")");
208  auto Offset = GetResourceOffset<ResourceType>();
209  return reinterpret_cast<const ResourceType*>(reinterpret_cast<const Uint8*>(m_ResourceBuffer) + Offset)[ResIndex];
210  }
211 
213 
214 private:
215  struct ResourceCounters
216  {
217  Uint32 NumUBs = 0;
218  Uint32 NumTextures = 0;
219  Uint32 NumImages = 0;
220  Uint32 NumStorageBlocks = 0;
221  };
222  static ResourceCounters CountResources(const PipelineResourceSignatureGLImpl& Signature,
223  const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
224  Uint32 NumAllowedTypes,
226 
227  // Offsets in bytes
228  using OffsetType = Uint16;
229 
230  template <typename ResourceType> OffsetType GetResourceOffset() const;
231 
232  template <typename ResourceType>
233  ResourceType& GetResource(Uint32 ResIndex) const
234  {
235  VERIFY(ResIndex < GetNumResources<ResourceType>(), "Resource index (", ResIndex, ") exceeds max allowed value (", GetNumResources<ResourceType>() - 1, ")");
236  auto Offset = GetResourceOffset<ResourceType>();
237  return reinterpret_cast<ResourceType*>(reinterpret_cast<Uint8*>(m_ResourceBuffer) + Offset)[ResIndex];
238  }
239 
240  template <typename ResourceType>
241  IShaderResourceVariable* GetResourceByName(const Char* Name) const;
242 
243  template <typename THandleUB,
244  typename THandleTexture,
245  typename THandleImage,
246  typename THandleStorageBuffer>
247  void HandleResources(THandleUB HandleUB,
248  THandleTexture HandleTexture,
249  THandleImage HandleImage,
250  THandleStorageBuffer HandleStorageBuffer)
251  {
252  for (Uint32 ub = 0; ub < GetNumResources<UniformBuffBindInfo>(); ++ub)
253  HandleUB(GetResource<UniformBuffBindInfo>(ub));
254 
255  for (Uint32 s = 0; s < GetNumResources<TextureBindInfo>(); ++s)
256  HandleTexture(GetResource<TextureBindInfo>(s));
257 
258  for (Uint32 i = 0; i < GetNumResources<ImageBindInfo>(); ++i)
259  HandleImage(GetResource<ImageBindInfo>(i));
260 
261  for (Uint32 s = 0; s < GetNumResources<StorageBufferBindInfo>(); ++s)
262  HandleStorageBuffer(GetResource<StorageBufferBindInfo>(s));
263  }
264 
265  template <typename THandleUB,
266  typename THandleTexture,
267  typename THandleImage,
268  typename THandleStorageBuffer>
269  void HandleConstResources(THandleUB HandleUB,
270  THandleTexture HandleTexture,
271  THandleImage HandleImage,
272  THandleStorageBuffer HandleStorageBuffer) const
273  {
274  for (Uint32 ub = 0; ub < GetNumResources<UniformBuffBindInfo>(); ++ub)
275  HandleUB(GetConstResource<UniformBuffBindInfo>(ub));
276 
277  for (Uint32 s = 0; s < GetNumResources<TextureBindInfo>(); ++s)
278  HandleTexture(GetConstResource<TextureBindInfo>(s));
279 
280  for (Uint32 i = 0; i < GetNumResources<ImageBindInfo>(); ++i)
281  HandleImage(GetConstResource<ImageBindInfo>(i));
282 
283  for (Uint32 s = 0; s < GetNumResources<StorageBufferBindInfo>(); ++s)
284  HandleStorageBuffer(GetConstResource<StorageBufferBindInfo>(s));
285  }
286 
288  friend class ShaderVariableLocator;
289 
290 private:
291  PipelineResourceSignatureGLImpl const* m_pSignature = nullptr;
292 
293  IObject& m_Owner;
294  // No need to use shared pointer, as the resource cache is either part of the same
295  // ShaderGLImpl object, or ShaderResourceBindingGLImpl object
296  ShaderResourceCacheGL& m_ResourceCache;
297  void* m_ResourceBuffer = nullptr;
298 
299  static constexpr OffsetType m_UBOffset = 0;
300  OffsetType m_TextureOffset = 0;
301  OffsetType m_ImageOffset = 0;
302  OffsetType m_StorageBufferOffset = 0;
303  OffsetType m_VariableEndOffset = 0;
304 
305 #ifdef DILIGENT_DEBUG
306  IMemoryAllocator* m_pDbgAllocator = nullptr;
307 #endif
308 };
309 
310 
311 template <>
312 inline Uint32 ShaderVariableManagerGL::GetNumResources<ShaderVariableManagerGL::UniformBuffBindInfo>() const
313 {
314  return GetNumUBs();
315 }
316 
317 template <>
318 inline Uint32 ShaderVariableManagerGL::GetNumResources<ShaderVariableManagerGL::TextureBindInfo>() const
319 {
320  return GetNumTextures();
321 }
322 
323 template <>
324 inline Uint32 ShaderVariableManagerGL::GetNumResources<ShaderVariableManagerGL::ImageBindInfo>() const
325 {
326  return GetNumImages();
327 }
328 
329 template <>
330 inline Uint32 ShaderVariableManagerGL::GetNumResources<ShaderVariableManagerGL::StorageBufferBindInfo>() const
331 {
332  return GetNumStorageBuffers();
333 }
334 
335 
336 
337 template <>
338 inline ShaderVariableManagerGL::OffsetType ShaderVariableManagerGL::
339  GetResourceOffset<ShaderVariableManagerGL::UniformBuffBindInfo>() const
340 {
341  return m_UBOffset;
342 }
343 
344 template <>
345 inline ShaderVariableManagerGL::OffsetType ShaderVariableManagerGL::
346  GetResourceOffset<ShaderVariableManagerGL::TextureBindInfo>() const
347 {
348  return m_TextureOffset;
349 }
350 
351 template <>
352 inline ShaderVariableManagerGL::OffsetType ShaderVariableManagerGL::
353  GetResourceOffset<ShaderVariableManagerGL::ImageBindInfo>() const
354 {
355  return m_ImageOffset;
356 }
357 
358 template <>
359 inline ShaderVariableManagerGL::OffsetType ShaderVariableManagerGL::
360  GetResourceOffset<ShaderVariableManagerGL::StorageBufferBindInfo>() const
361 {
362  return m_StorageBufferOffset;
363 }
364 
365 } // namespace Diligent
Diligent::ShaderVariableManagerGL::Initialize
void Initialize(const PipelineResourceSignatureGLImpl &Signature, IMemoryAllocator &Allocator, const SHADER_RESOURCE_VARIABLE_TYPE *AllowedVarTypes, Uint32 NumAllowedTypes, SHADER_TYPE ShaderType)
Definition: ShaderVariableManagerGL.cpp:90
Diligent::ShaderVariableManagerGL::TextureBindInfo::BindResource
void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerGL.cpp:233
Diligent::ShaderVariableManagerGL::Destroy
void Destroy(IMemoryAllocator &Allocator)
Definition: ShaderVariableManagerGL.cpp:182
Diligent::PipelineResourceSignatureGLImpl
Implementation of the Diligent::PipelineResourceSignatureGLImpl class.
Definition: PipelineResourceSignatureGLImpl.hpp:63
Diligent::ShaderVariableManagerGL::GetNumStorageBuffers
Uint32 GetNumStorageBuffers() const
Definition: ShaderVariableManagerGL.hpp:199
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::ShaderResourceCacheGL::IsUBBound
bool IsUBBound(Uint32 CacheOffset) const
Definition: ShaderResourceCacheGL.hpp:160
Diligent::SHADER_TYPE
SHADER_TYPE
Describes the shader type.
Definition: GraphicsTypes.h:65
Diligent::SHADER_RESOURCE_TYPE_TEXTURE_SRV
@ SHADER_RESOURCE_TYPE_TEXTURE_SRV
Shader resource view of a texture (sampled image)
Definition: Shader.h:365
ShaderResourceCacheGL.hpp
Flags
Uint32 Flags
Definition: DXBCUtils.cpp:71
Diligent::ShaderVariableManagerGL::ImageBindInfo::ImageBindInfo
ImageBindInfo(ShaderVariableManagerGL &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerGL.hpp:152
Diligent::IObject
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
Diligent::ShaderVariableManagerGL::GLVariableBase
Definition: ShaderVariableManagerGL.hpp:105
Diligent::ShaderVariableManagerGL::GetOwner
IObject & GetOwner()
Definition: ShaderVariableManagerGL.hpp:188
Diligent::ShaderVariableManagerGL::GetVariableIndex
Uint32 GetVariableIndex(const IShaderResourceVariable &Var) const
Definition: ShaderVariableManagerGL.cpp:538
ShaderResourceVariableBase.hpp
PipelineResourceAttribsGL.hpp
Diligent::ShaderVariableManagerGL::GetNumResources
Uint32 GetNumResources() const
Diligent::ShaderVariableManagerGL::BindResources
void BindResources(IResourceMapping *pResourceMapping, Uint32 Flags)
Definition: ShaderVariableManagerGL.cpp:386
Diligent::ShaderVariableManagerGL::GetNumUBs
Uint32 GetNumUBs() const
Definition: ShaderVariableManagerGL.hpp:196
Diligent::ShaderVariableManagerGL::GetVariableCount
Uint32 GetVariableCount() const
Definition: ShaderVariableManagerGL.hpp:190
Diligent::ShaderVariableManagerGL::StorageBufferBindInfo
Definition: ShaderVariableManagerGL.hpp:168
Diligent::ShaderResourceCacheGL
The class implements a cache that holds resources bound to a specific GL program.
Definition: ShaderResourceCacheGL.hpp:49
Diligent::PipelineResourceAttribsGL
Definition: PipelineResourceAttribsGL.hpp:41
Diligent::ShaderVariableLocator
Definition: ShaderVariableManagerD3D11.cpp:627
Diligent::IDeviceObject
Base interface for all objects created by the render device Diligent::IRenderDevice.
Definition: DeviceObject.h:52
Diligent::ShaderVariableManagerGL::ImageBindInfo
Definition: ShaderVariableManagerGL.hpp:150
Diligent::SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT
@ SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT
Input attachment in a render pass.
Definition: Shader.h:380
Diligent::ShaderVariableManagerGL::TextureBindInfo
Definition: ShaderVariableManagerGL.hpp:132
Diligent::ShaderVariableManagerGL::UniformBuffBindInfo::UniformBuffBindInfo
UniformBuffBindInfo(ShaderVariableManagerGL &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerGL.hpp:118
Diligent::ShaderVariableBase< UniformBuffBindInfo, ShaderVariableManagerGL >::GetDesc
const PipelineResourceDesc & GetDesc() const
Definition: ShaderResourceVariableBase.hpp:626
Diligent::ShaderVariableManagerGL::UniformBuffBindInfo
Definition: ShaderVariableManagerGL.hpp:116
Diligent::ShaderResourceCacheGL::IsImageBound
bool IsImageBound(Uint32 CacheOffset, bool dbgIsTextureView) const
Definition: ShaderResourceCacheGL.hpp:179
Diligent::ShaderVariableManagerGL::GLVariableBase::GetAttribs
const ResourceAttribs & GetAttribs() const
Definition: ShaderVariableManagerGL.hpp:112
Diligent::ShaderVariableManagerGL::GetNumImages
Uint32 GetNumImages() const
Definition: ShaderVariableManagerGL.hpp:198
Diligent::ShaderVariableIndexLocator
Definition: ShaderVariableManagerD3D11.cpp:548
Diligent::ShaderResourceCacheGL::IsTextureBound
bool IsTextureBound(Uint32 CacheOffset, bool dbgIsTextureView) const
Definition: ShaderResourceCacheGL.hpp:169
Diligent::ShaderVariableManagerGL
Definition: ShaderVariableManagerGL.hpp:67
Diligent::ShaderVariableManagerGL::StorageBufferBindInfo::IsBound
virtual bool IsBound(Uint32 ArrayIndex) const override final
Definition: ShaderVariableManagerGL.hpp:176
DILIGENT_CALL_TYPE
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
Diligent::PipelineResourceDesc
Pipeline resource description.
Definition: PipelineResourceSignature.h:120
Diligent::Uint32
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Diligent::ShaderVariableManagerGL::TextureBindInfo::TextureBindInfo
TextureBindInfo(ShaderVariableManagerGL &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerGL.hpp:134
Diligent::ShaderVariableManagerGL::GetRequiredMemorySize
static size_t GetRequiredMemorySize(const PipelineResourceSignatureGLImpl &Signature, const SHADER_RESOURCE_VARIABLE_TYPE *AllowedVarTypes, Uint32 NumAllowedTypes, SHADER_TYPE ShaderType)
Definition: ShaderVariableManagerGL.cpp:74
Diligent::SHADER_RESOURCE_TYPE_TEXTURE_UAV
@ SHADER_RESOURCE_TYPE_TEXTURE_UAV
Unordered access view of a texture (sotrage image)
Definition: Shader.h:371
Object.h
Diligent::ShaderVariableManagerGL::StorageBufferBindInfo::BindResource
void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerGL.cpp:354
Diligent::ShaderVariableManagerGL::GetNumTextures
Uint32 GetNumTextures() const
Definition: ShaderVariableManagerGL.hpp:197
Diligent::ShaderVariableManagerGL::ImageBindInfo::IsBound
virtual bool IsBound(Uint32 ArrayIndex) const override final
Definition: ShaderVariableManagerGL.hpp:158
Diligent::ShaderVariableManagerGL::GetConstResource
const ResourceType & GetConstResource(Uint32 ResIndex) const
Definition: ShaderVariableManagerGL.hpp:205
Diligent::PipelineResourceAttribsGL::CacheOffset
const Uint32 CacheOffset
Definition: PipelineResourceAttribsGL.hpp:52
Diligent::ShaderVariableManagerGL::operator=
ShaderVariableManagerGL & operator=(const ShaderVariableManagerGL &)=delete
Diligent::IMemoryAllocator
Base interface for a raw memory allocator.
Definition: MemoryAllocator.h:41
Diligent::ShaderVariableManagerGL::ShaderVariableManagerGL
ShaderVariableManagerGL(IObject &Owner, ShaderResourceCacheGL &ResourceCache) noexcept
Definition: ShaderVariableManagerGL.hpp:70
Diligent::ShaderVariableManagerGL::UniformBuffBindInfo::BindResource
void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerGL.cpp:207
Diligent::Uint16
uint16_t Uint16
16-bit unsigned integer
Definition: BasicTypes.h:52
Diligent::ShaderVariableManagerGL::TextureBindInfo::IsBound
virtual bool IsBound(Uint32 ArrayIndex) const override final
Definition: ShaderVariableManagerGL.hpp:140
Diligent::ShaderResourceCacheGL::IsSSBOBound
bool IsSSBOBound(Uint32 CacheOffset) const
Definition: ShaderResourceCacheGL.hpp:189
Diligent::Uint8
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
Diligent::ShaderVariableBase< ThisImplType, ShaderVariableManagerGL >::m_ResIndex
const Uint32 m_ResIndex
Definition: ShaderResourceVariableBase.hpp:633
Diligent::ShaderVariableManagerGL::UniformBuffBindInfo::IsBound
virtual bool IsBound(Uint32 ArrayIndex) const override final
Definition: ShaderVariableManagerGL.hpp:124
VERIFY_EXPR
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
Diligent::ShaderVariableManagerGL::StorageBufferBindInfo::StorageBufferBindInfo
StorageBufferBindInfo(ShaderVariableManagerGL &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerGL.hpp:170
VERIFY
#define VERIFY(...)
Definition: DebugUtilities.hpp:76
Diligent::ShaderVariableManagerGL::ImageBindInfo::BindResource
void BindResource(IDeviceObject *pObject, Uint32 ArrayIndex)
Definition: ShaderVariableManagerGL.cpp:298
Diligent::ShaderVariableManagerGL::GetResourceDesc
const PipelineResourceDesc & GetResourceDesc(Uint32 Index) const
Definition: ShaderVariableManagerGL.cpp:564
Diligent::ShaderVariableManagerGL::GetVariable
IShaderResourceVariable * GetVariable(const Char *Name) const
Definition: ShaderVariableManagerGL.cpp:429
ShaderType
Uint16 ShaderType
Definition: DXBCUtils.cpp:70
Diligent::ShaderVariableManagerGL::GLVariableBase::GLVariableBase
GLVariableBase(ShaderVariableManagerGL &ParentLayout, Uint32 ResIndex)
Definition: ShaderVariableManagerGL.hpp:108
Diligent::ShaderVariableBase< ThisImplType, ShaderVariableManagerGL >::m_ParentManager
ShaderVariableManagerGL & m_ParentManager
Definition: ShaderResourceVariableBase.hpp:630
Diligent::ShaderVariableManagerGL::~ShaderVariableManagerGL
~ShaderVariableManagerGL()
Definition: ShaderVariableManagerGL.cpp:177
Diligent
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
Diligent::ShaderVariableManagerGL::GetResourceAttribs
const ResourceAttribs & GetResourceAttribs(Uint32 Index) const
Definition: ShaderVariableManagerGL.cpp:570
Diligent::SHADER_RESOURCE_VARIABLE_TYPE
SHADER_RESOURCE_VARIABLE_TYPE
Describes the type of the shader resource variable.
Definition: ShaderResourceVariable.h:48
Diligent::IResourceMapping
Resouce mapping.
Definition: ResourceMapping.h:107