Diligent Engine  v.2.4.g
RenderDeviceVkImpl.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 #include <memory>
33 
34 #include "EngineVkImplTraits.hpp"
35 
36 #include "RenderDeviceBase.hpp"
38 
45 
47 #include "VulkanDynamicHeap.hpp"
48 #include "VulkanUploadHeap.hpp"
49 #include "FramebufferCache.hpp"
50 #include "RenderPassCache.hpp"
51 #include "CommandPoolManager.hpp"
52 #include "DXCompiler.hpp"
53 
54 namespace Diligent
55 {
56 
58 class RenderDeviceVkImpl final : public RenderDeviceNextGenBase<RenderDeviceBase<EngineVkImplTraits>, ICommandQueueVk>
59 {
60 public:
62 
64  IMemoryAllocator& RawMemAllocator,
65  IEngineFactory* pEngineFactory,
66  const EngineVkCreateInfo& EngineCI,
67  size_t CommandQueueCount,
68  ICommandQueueVk** pCmdQueues,
69  std::shared_ptr<VulkanUtilities::VulkanInstance> Instance,
70  std::unique_ptr<VulkanUtilities::VulkanPhysicalDevice> PhysicalDevice,
71  std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice) noexcept(false);
73 
75 
76 
77  virtual void DILIGENT_CALL_TYPE CreateGraphicsPipelineState(const GraphicsPipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final;
78 
80  virtual void DILIGENT_CALL_TYPE CreateComputePipelineState(const ComputePipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final;
81 
83  virtual void DILIGENT_CALL_TYPE CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final;
84 
86  virtual void DILIGENT_CALL_TYPE CreateBuffer(const BufferDesc& BuffDesc,
87  const BufferData* pBuffData,
88  IBuffer** ppBuffer) override final;
89 
91  virtual void DILIGENT_CALL_TYPE CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader** ppShader) override final;
92 
94  virtual void DILIGENT_CALL_TYPE CreateTexture(const TextureDesc& TexDesc,
95  const TextureData* pData,
96  ITexture** ppTexture) override final;
97 
98  void CreateTexture(const TextureDesc& TexDesc, VkImage vkImgHandle, RESOURCE_STATE InitialState, class TextureVkImpl** ppTexture);
99 
101  virtual void DILIGENT_CALL_TYPE CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler) override final;
102 
104  virtual void DILIGENT_CALL_TYPE CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
105 
107  virtual void DILIGENT_CALL_TYPE CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
108 
110  virtual void DILIGENT_CALL_TYPE CreateRenderPass(const RenderPassDesc& Desc,
111  IRenderPass** ppRenderPass) override final;
112 
113  void CreateRenderPass(const RenderPassDesc& Desc,
114  IRenderPass** ppRenderPass,
115  bool IsDeviceInternal);
116 
117 
119  virtual void DILIGENT_CALL_TYPE CreateFramebuffer(const FramebufferDesc& Desc,
120  IFramebuffer** ppFramebuffer) override final;
121 
123  virtual void DILIGENT_CALL_TYPE CreateBLAS(const BottomLevelASDesc& Desc,
124  IBottomLevelAS** ppBLAS) override final;
125 
127  virtual void DILIGENT_CALL_TYPE CreateTLAS(const TopLevelASDesc& Desc,
128  ITopLevelAS** ppTLAS) override final;
129 
131  virtual void DILIGENT_CALL_TYPE CreateSBT(const ShaderBindingTableDesc& Desc,
132  IShaderBindingTable** ppSBT) override final;
133 
136  IPipelineResourceSignature** ppSignature) override final;
137 
139  IPipelineResourceSignature** ppSignature,
140  bool IsDeviceInternal);
141 
143  virtual VkDevice DILIGENT_CALL_TYPE GetVkDevice() override final { return m_LogicalVkDevice->GetVkDevice(); }
144 
146  virtual VkPhysicalDevice DILIGENT_CALL_TYPE GetVkPhysicalDevice() override final { return m_PhysicalDevice->GetVkDeviceHandle(); }
147 
149  virtual VkInstance DILIGENT_CALL_TYPE GetVkInstance() override final { return m_VulkanInstance->GetVkInstance(); }
150 
152  virtual Uint32 DILIGENT_CALL_TYPE GetVkVersion() override final { return m_VkVersion; }
153 
155  virtual void DILIGENT_CALL_TYPE CreateTextureFromVulkanImage(VkImage vkImage,
156  const TextureDesc& TexDesc,
157  RESOURCE_STATE InitialState,
158  ITexture** ppTexture) override final;
159 
161  virtual void DILIGENT_CALL_TYPE CreateBufferFromVulkanResource(VkBuffer vkBuffer,
162  const BufferDesc& BuffDesc,
163  RESOURCE_STATE InitialState,
164  IBuffer** ppBuffer) override final;
165 
167  virtual void DILIGENT_CALL_TYPE CreateBLASFromVulkanResource(VkAccelerationStructureKHR vkBLAS,
168  const BottomLevelASDesc& Desc,
169  RESOURCE_STATE InitialState,
170  IBottomLevelAS** ppBLAS) override final;
171 
173  virtual void DILIGENT_CALL_TYPE CreateTLASFromVulkanResource(VkAccelerationStructureKHR vkTLAS,
174  const TopLevelASDesc& Desc,
175  RESOURCE_STATE InitialState,
176  ITopLevelAS** ppTLAS) override final;
177 
179  virtual void DILIGENT_CALL_TYPE IdleGPU() override final;
180 
181  // pImmediateCtx parameter is only used to make sure the command buffer is submitted from the immediate context
182  // The method returns fence value associated with the submitted command buffer
183  Uint64 ExecuteCommandBuffer(Uint32 QueueIndex, const VkSubmitInfo& SubmitInfo, class DeviceContextVkImpl* pImmediateCtx, std::vector<std::pair<Uint64, RefCntAutoPtr<IFence>>>* pSignalFences);
184 
185  void AllocateTransientCmdPool(VulkanUtilities::CommandPoolWrapper& CmdPool, VkCommandBuffer& vkCmdBuff, const Char* DebugPoolName = nullptr);
186  void ExecuteAndDisposeTransientCmdBuff(Uint32 QueueIndex, VkCommandBuffer vkCmdBuff, VulkanUtilities::CommandPoolWrapper&& CmdPool);
187 
189  virtual void DILIGENT_CALL_TYPE ReleaseStaleResources(bool ForceRelease = false) override final;
190 
191  DescriptorSetAllocation AllocateDescriptorSet(Uint64 CommandQueueMask, VkDescriptorSetLayout SetLayout, const char* DebugName = "")
192  {
193  return m_DescriptorSetAllocator.Allocate(CommandQueueMask, SetLayout, DebugName);
194  }
195  DescriptorPoolManager& GetDynamicDescriptorPool() { return m_DynamicDescriptorPool; }
196 
197  std::shared_ptr<const VulkanUtilities::VulkanInstance> GetVulkanInstance() const { return m_VulkanInstance; }
198 
199  const VulkanUtilities::VulkanPhysicalDevice& GetPhysicalDevice() const { return *m_PhysicalDevice; }
200  const VulkanUtilities::VulkanLogicalDevice& GetLogicalDevice() { return *m_LogicalVkDevice; }
201 
202  FramebufferCache& GetFramebufferCache() { return m_FramebufferCache; }
203  RenderPassCache& GetImplicitRenderPassCache() { return m_ImplicitRenderPassCache; }
204 
205  VulkanUtilities::VulkanMemoryAllocation AllocateMemory(const VkMemoryRequirements& MemReqs, VkMemoryPropertyFlags MemoryProperties, VkMemoryAllocateFlags AllocateFlags = 0)
206  {
207  return m_MemoryMgr.Allocate(MemReqs, MemoryProperties, AllocateFlags);
208  }
209  VulkanUtilities::VulkanMemoryAllocation AllocateMemory(VkDeviceSize Size, VkDeviceSize Alignment, uint32_t MemoryTypeIndex, VkMemoryAllocateFlags AllocateFlags = 0)
210  {
211  const auto& MemoryProps = m_PhysicalDevice->GetMemoryProperties();
212  VERIFY_EXPR(MemoryTypeIndex < MemoryProps.memoryTypeCount);
213  const auto MemoryFlags = MemoryProps.memoryTypes[MemoryTypeIndex].propertyFlags;
214  return m_MemoryMgr.Allocate(Size, Alignment, MemoryTypeIndex, (MemoryFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0, AllocateFlags);
215  }
217 
218  VulkanDynamicMemoryManager& GetDynamicMemoryManager() { return m_DynamicMemoryManager; }
219 
220  void FlushStaleResources(Uint32 CmdQueueIndex);
221 
222  IDXCompiler* GetDxCompiler() const { return m_pDxCompiler.get(); }
223 
224  struct Properties
225  {
232  };
233 
234  const Properties& GetProperties() const
235  {
236  return m_Properties;
237  }
238 
239 private:
240  virtual void TestTextureFormat(TEXTURE_FORMAT TexFormat) override final;
241 
242  // Submits command buffer(s) for execution to the command queue and
243  // returns the submitted command buffer(s) number and the fence value.
244  // If SubmitInfo contains multiple command buffers, they all are treated
245  // like one and sumbitted atomically.
246  // Parameters:
247  // * SubmittedCmdBuffNumber - submitted command buffer number
248  // * SubmittedFenceValue - fence value associated with the submitted command buffer
249  void SubmitCommandBuffer(Uint32 QueueIndex,
250  const VkSubmitInfo& SubmitInfo,
251  Uint64& SubmittedCmdBuffNumber,
252  Uint64& SubmittedFenceValue,
253  std::vector<std::pair<Uint64, RefCntAutoPtr<IFence>>>* pFences);
254 
255  std::shared_ptr<VulkanUtilities::VulkanInstance> m_VulkanInstance;
256  std::unique_ptr<VulkanUtilities::VulkanPhysicalDevice> m_PhysicalDevice;
257  std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> m_LogicalVkDevice;
258 
259  EngineVkCreateInfo m_EngineAttribs;
260 
261  FramebufferCache m_FramebufferCache;
262  RenderPassCache m_ImplicitRenderPassCache;
263  DescriptorSetAllocator m_DescriptorSetAllocator;
264  DescriptorPoolManager m_DynamicDescriptorPool;
265 
266  // These one-time command pools are used by buffer and texture constructors to
267  // issue copy commands. Vulkan requires that every command pool is used by one thread
268  // at a time, so every constructor must allocate command buffer from its own pool.
269  CommandPoolManager m_TransientCmdPoolMgr;
270 
272 
273  VulkanDynamicMemoryManager m_DynamicMemoryManager;
274 
275  const Uint32 m_VkVersion; // Must be defined before m_pDxCompiler
276  std::unique_ptr<IDXCompiler> m_pDxCompiler;
277 
278  Properties m_Properties;
279 };
280 
281 } // namespace Diligent
Diligent::RenderDeviceVkImpl::TestTextureFormat
virtual void TestTextureFormat(TEXTURE_FORMAT TexFormat) override final
Definition: RenderDeviceVkImpl.cpp:516
Diligent::DescriptorSetAllocator
Definition: DescriptorPoolManager.hpp:187
Diligent::RenderDeviceVkImpl::GetDxCompiler
IDXCompiler * GetDxCompiler() const
Definition: RenderDeviceVkImpl.hpp:222
Diligent::RenderDeviceVkImpl::GetFramebufferCache
FramebufferCache & GetFramebufferCache()
Definition: RenderDeviceVkImpl.hpp:202
VulkanLogicalDevice.hpp
Diligent::IReferenceCounters
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
Diligent::RenderDeviceVkImpl
Render device implementation in Vulkan backend.
Definition: RenderDeviceVkImpl.hpp:58
Diligent::GraphicsPipelineStateCreateInfo
Graphics pipeline state creation attributes.
Definition: PipelineState.h:397
Diligent::Char
char Char
Definition: BasicTypes.h:64
Diligent::SamplerDesc
Sampler description.
Definition: Sampler.h:58
Diligent::ISampler
Texture sampler interface.
Definition: Sampler.h:192
Diligent::RayTracingPipelineStateCreateInfo
Ray tracing pipeline state description.
Definition: PipelineState.h:443
Diligent::IPipelineResourceSignature
Pipeline resource signature interface.
Definition: PipelineResourceSignature.h:226
Diligent::RenderDeviceVkImpl::GetImplicitRenderPassCache
RenderPassCache & GetImplicitRenderPassCache()
Definition: RenderDeviceVkImpl.hpp:203
Diligent::RenderDeviceVkImpl::Properties::ShaderGroupHandleSize
const Uint32 ShaderGroupHandleSize
Definition: RenderDeviceVkImpl.hpp:226
Diligent::PipelineResourceSignatureDesc
Pipeline resource signature description.
Definition: PipelineResourceSignature.h:166
Diligent::IShaderBindingTable
Shader binding table interface.
Definition: ShaderBindingTable.h:93
Diligent::ICommandQueueVk
Command queue interface.
Definition: CommandQueueVk.h:51
VulkanUtilities::VulkanLogicalDevice
Definition: VulkanLogicalDevice.hpp:88
Diligent::FramebufferCache
Definition: FramebufferCache.hpp:42
Diligent::TopLevelASDesc
Top-level AS description.
Definition: TopLevelAS.h:49
Diligent::IPipelineState
Pipeline state interface.
Definition: PipelineState.h:505
Diligent::QueryDesc
Query description.
Definition: Query.h:150
RenderDeviceNextGenBase.hpp
Diligent::RenderDeviceVkImpl::AllocateDescriptorSet
DescriptorSetAllocation AllocateDescriptorSet(Uint64 CommandQueueMask, VkDescriptorSetLayout SetLayout, const char *DebugName="")
Definition: RenderDeviceVkImpl.hpp:191
Diligent::RenderDeviceVkImpl::GetVkVersion
virtual Uint32 GetVkVersion() override final
Implementation of IRenderDeviceVk::GetVkVersion().
Definition: RenderDeviceVkImpl.hpp:152
Diligent::DescriptorSetAllocator::Allocate
DescriptorSetAllocation Allocate(Uint64 CommandQueueMask, VkDescriptorSetLayout SetLayout, const char *DebugName="")
Definition: DescriptorPoolManager.cpp:198
Diligent::RenderDeviceVkImpl::CreateSBT
virtual void CreateSBT(const ShaderBindingTableDesc &Desc, IShaderBindingTable **ppSBT) override final
Implementation of IRenderDevice::CreateSBT() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:744
Diligent::RenderDeviceVkImpl::ExecuteCommandBuffer
Uint64 ExecuteCommandBuffer(Uint32 QueueIndex, const VkSubmitInfo &SubmitInfo, class DeviceContextVkImpl *pImmediateCtx, std::vector< std::pair< Uint64, RefCntAutoPtr< IFence >>> *pSignalFences)
Definition: RenderDeviceVkImpl.cpp:477
Diligent::IShader
Shader interface.
Definition: Shader.h:428
Diligent::Uint64
uint64_t Uint64
64-bit unsigned integer
Definition: BasicTypes.h:50
Diligent::ITopLevelAS
Top-level AS interface.
Definition: TopLevelAS.h:151
FramebufferCache.hpp
Diligent::RenderDeviceVkImpl::CreateBLAS
virtual void CreateBLAS(const BottomLevelASDesc &Desc, IBottomLevelAS **ppBLAS) override final
Implementation of IRenderDevice::CreateBLAS() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:724
Diligent::RenderDeviceVkImpl::GetVkPhysicalDevice
virtual VkPhysicalDevice GetVkPhysicalDevice() override final
Implementation of IRenderDeviceVk::GetVkPhysicalDevice().
Definition: RenderDeviceVkImpl.hpp:146
Diligent::RenderDeviceVkImpl::ReleaseStaleResources
virtual void ReleaseStaleResources(bool ForceRelease=false) override final
Implementation of IRenderDevice::ReleaseStaleResources() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:509
Diligent::RenderDeviceVkImpl::ExecuteAndDisposeTransientCmdBuff
void ExecuteAndDisposeTransientCmdBuff(Uint32 QueueIndex, VkCommandBuffer vkCmdBuff, VulkanUtilities::CommandPoolWrapper &&CmdPool)
Definition: RenderDeviceVkImpl.cpp:339
Diligent::IFramebuffer
Framebuffer interface.
Definition: Framebuffer.h:73
Diligent::RenderDeviceVkImpl::CreateSampler
virtual void CreateSampler(const SamplerDesc &SamplerDesc, ISampler **ppSampler) override final
Implementation of IRenderDevice::CreateSampler() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:684
VulkanDynamicHeap.hpp
DXCompiler.hpp
Diligent::RenderDeviceVkImpl::GetVulkanInstance
std::shared_ptr< const VulkanUtilities::VulkanInstance > GetVulkanInstance() const
Definition: RenderDeviceVkImpl.hpp:197
Diligent::RenderDeviceVkImpl::AllocateTransientCmdPool
void AllocateTransientCmdPool(VulkanUtilities::CommandPoolWrapper &CmdPool, VkCommandBuffer &vkCmdBuff, const Char *DebugPoolName=nullptr)
Definition: RenderDeviceVkImpl.cpp:307
Diligent::RenderPassDesc
Render pass description.
Definition: RenderPass.h:341
Diligent::RenderDeviceVkImpl::GetDynamicMemoryManager
VulkanDynamicMemoryManager & GetDynamicMemoryManager()
Definition: RenderDeviceVkImpl.hpp:218
Diligent::RenderDeviceVkImpl::GetProperties
const Properties & GetProperties() const
Definition: RenderDeviceVkImpl.hpp:234
Diligent::ShaderCreateInfo
Shader creation attributes.
Definition: Shader.h:241
Diligent::IBuffer
Buffer interface.
Definition: Buffer.h:187
RenderDeviceBase.hpp
Diligent::RenderDeviceVkImpl::CreateTLAS
virtual void CreateTLAS(const TopLevelASDesc &Desc, ITopLevelAS **ppTLAS) override final
Implementation of IRenderDevice::CreateTLAS() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:738
Diligent::CommandPoolManager
Definition: CommandPoolManager.hpp:40
Diligent::RenderDeviceNextGenBase
Base implementation of the render device for next-generation backends.
Definition: RenderDeviceNextGenBase.hpp:49
Diligent::ShaderBindingTableDesc
Shader binding table description.
Definition: ShaderBindingTable.h:50
VulkanUtilities::VulkanMemoryManager::Allocate
VulkanMemoryAllocation Allocate(VkDeviceSize Size, VkDeviceSize Alignment, uint32_t MemoryTypeIndex, bool HostVisible, VkMemoryAllocateFlags AllocateFlags)
Definition: VulkanMemoryManager.cpp:161
Diligent::RenderDeviceVkImpl::Properties::MaxDrawMeshTasksCount
const Uint32 MaxDrawMeshTasksCount
Definition: RenderDeviceVkImpl.hpp:229
Diligent::RenderDeviceVkImpl::GetVkInstance
virtual VkInstance GetVkInstance() override final
Implementation of IRenderDeviceVk::GetVkInstance().
Definition: RenderDeviceVkImpl.hpp:149
Diligent::TextureDesc
Texture description.
Definition: Texture.h:47
Diligent::RenderDeviceVkImpl::CreateTextureFromVulkanImage
virtual void CreateTextureFromVulkanImage(VkImage vkImage, const TextureDesc &TexDesc, RESOURCE_STATE InitialState, ITexture **ppTexture) override final
Implementation of IRenderDeviceVk::CreateTextureFromVulkanImage().
Definition: RenderDeviceVkImpl.cpp:660
Diligent::IDXCompiler
DXC compiler interface.
Definition: DXCompiler.hpp:55
VulkanCommandBufferPool.hpp
Diligent::RenderDeviceVkImpl::RenderDeviceVkImpl
RenderDeviceVkImpl(IReferenceCounters *pRefCounters, IMemoryAllocator &RawMemAllocator, IEngineFactory *pEngineFactory, const EngineVkCreateInfo &EngineCI, size_t CommandQueueCount, ICommandQueueVk **pCmdQueues, std::shared_ptr< VulkanUtilities::VulkanInstance > Instance, std::unique_ptr< VulkanUtilities::VulkanPhysicalDevice > PhysicalDevice, std::shared_ptr< VulkanUtilities::VulkanLogicalDevice > LogicalDevice) noexcept(false)
Definition: RenderDeviceVkImpl.cpp:54
Diligent::DescriptorSetAllocation
Definition: DescriptorPoolManager.hpp:50
Diligent::RenderDeviceVkImpl::CreateBuffer
virtual void CreateBuffer(const BufferDesc &BuffDesc, const BufferData *pBuffData, IBuffer **ppBuffer) override final
Implementation of IRenderDevice::CreateBuffer() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:648
Diligent::RenderDeviceVkImpl::Properties::MaxRayTracingRecursionDepth
const Uint32 MaxRayTracingRecursionDepth
Definition: RenderDeviceVkImpl.hpp:230
Diligent::RenderDeviceVkImpl::CreateTexture
virtual void CreateTexture(const TextureDesc &TexDesc, const TextureData *pData, ITexture **ppTexture) override final
Implementation of IRenderDevice::CreateTexture() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:679
IMPLEMENT_QUERY_INTERFACE_IN_PLACE
#define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName)
Definition: ObjectBase.hpp:59
Diligent::RenderDeviceVkImpl::GetDynamicDescriptorPool
DescriptorPoolManager & GetDynamicDescriptorPool()
Definition: RenderDeviceVkImpl.hpp:195
Diligent::RenderDeviceVkImpl::CreateQuery
virtual void CreateQuery(const QueryDesc &Desc, IQuery **ppQuery) override final
Implementation of IRenderDevice::CreateQuery() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:694
Diligent::DescriptorPoolManager
Definition: DescriptorPoolManager.hpp:133
Diligent::RenderDeviceVkImpl::GetVkDevice
virtual VkDevice GetVkDevice() override final
Implementation of IRenderDeviceVk::GetVkDevice().
Definition: RenderDeviceVkImpl.hpp:143
Diligent::RenderDeviceVkImpl::Properties::MaxShaderRecordStride
const Uint32 MaxShaderRecordStride
Definition: RenderDeviceVkImpl.hpp:227
Diligent::RefCntAutoPtr
Template class that implements reference counting.
Definition: RefCntAutoPtr.hpp:73
DILIGENT_CALL_TYPE
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
Diligent::TextureData
Describes the initial data to store in the texture.
Definition: Texture.h:221
Diligent::ComputePipelineStateCreateInfo
Compute pipeline state description.
Definition: PipelineState.h:427
Diligent::RenderDeviceVkImpl::CreateBufferFromVulkanResource
virtual void CreateBufferFromVulkanResource(VkBuffer vkBuffer, const BufferDesc &BuffDesc, RESOURCE_STATE InitialState, IBuffer **ppBuffer) override final
Implementation of IRenderDeviceVk::CreateBufferFromVulkanResource().
Definition: RenderDeviceVkImpl.cpp:643
Diligent::RenderDeviceVkImpl::CreateShader
virtual void CreateShader(const ShaderCreateInfo &ShaderCreateInfo, IShader **ppShader) override final
Implementation of IRenderDevice::CreateShader() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:654
Diligent::Uint32
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Diligent::RenderDeviceVkImpl::GetPhysicalDevice
const VulkanUtilities::VulkanPhysicalDevice & GetPhysicalDevice() const
Definition: RenderDeviceVkImpl.hpp:199
Diligent::DeviceContextVkImpl
Device context implementation in Vulkan backend.
Definition: DeviceContextVkImpl.hpp:67
Diligent::RenderDeviceVkImpl::CreateGraphicsPipelineState
virtual void CreateGraphicsPipelineState(const GraphicsPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override final
Implementation of IRenderDevice::CreateGraphicsPipelineState() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:628
Diligent::RenderDeviceVkImpl::CreateComputePipelineState
virtual void CreateComputePipelineState(const ComputePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override final
Implementation of IRenderDevice::CreateComputePipelineState() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:633
Diligent::TEXTURE_FORMAT
TEXTURE_FORMAT
Texture formats.
Definition: GraphicsTypes.h:328
Diligent::BufferDesc
Buffer description.
Definition: Buffer.h:74
Diligent::TextureVkImpl
Texture object implementation in Vulkan backend.
Definition: TextureVkImpl.hpp:42
VulkanUtilities::VulkanPhysicalDevice
Definition: VulkanPhysicalDevice.hpp:37
Diligent::RenderDeviceVkImpl::IdleGPU
virtual void IdleGPU() override final
Implementation of IRenderDevice::IdleGPU() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:494
Diligent::IMemoryAllocator
Base interface for a raw memory allocator.
Definition: MemoryAllocator.h:41
Diligent::RenderDeviceVkImpl::Properties::MaxRayGenThreads
const Uint32 MaxRayGenThreads
Definition: RenderDeviceVkImpl.hpp:231
CommandPoolManager.hpp
Diligent::IFence
Fence interface.
Definition: Fence.h:62
std
Definition: AdvancedMath.hpp:979
VulkanUploadHeap.hpp
RenderPassCache.hpp
Diligent::RenderDeviceVkImpl::GetGlobalMemoryManager
VulkanUtilities::VulkanMemoryManager & GetGlobalMemoryManager()
Definition: RenderDeviceVkImpl.hpp:216
Diligent::IQuery
Query interface.
Definition: Query.h:177
Diligent::RenderDeviceVkImpl::AllocateMemory
VulkanUtilities::VulkanMemoryAllocation AllocateMemory(const VkMemoryRequirements &MemReqs, VkMemoryPropertyFlags MemoryProperties, VkMemoryAllocateFlags AllocateFlags=0)
Definition: RenderDeviceVkImpl.hpp:205
VERIFY_EXPR
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
Diligent::FramebufferDesc
Framebuffer description.
Definition: Framebuffer.h:46
VulkanUtilities::VulkanMemoryManager
Definition: VulkanMemoryManager.hpp:146
Diligent::RenderDeviceVkImpl::Properties::ShaderGroupBaseAlignment
const Uint32 ShaderGroupBaseAlignment
Definition: RenderDeviceVkImpl.hpp:228
Diligent::IBottomLevelAS
Bottom-level AS interface.
Definition: BottomLevelAS.h:207
VulkanObjectWrappers.hpp
Diligent::RenderPassCache
Definition: RenderPassCache.hpp:48
EngineVkImplTraits.hpp
Diligent::RenderDeviceVkImpl::AllocateMemory
VulkanUtilities::VulkanMemoryAllocation AllocateMemory(VkDeviceSize Size, VkDeviceSize Alignment, uint32_t MemoryTypeIndex, VkMemoryAllocateFlags AllocateFlags=0)
Definition: RenderDeviceVkImpl.hpp:209
VulkanUtilities
Definition: VulkanCommandBuffer.hpp:33
Diligent::RenderDeviceVkImpl::Properties
Definition: RenderDeviceVkImpl.hpp:224
Diligent::RenderDeviceVkImpl::CreatePipelineResourceSignature
virtual void CreatePipelineResourceSignature(const PipelineResourceSignatureDesc &Desc, IPipelineResourceSignature **ppSignature) override final
Implementation of IRenderDevice::CreatePipelineResourceSignature() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:750
VulkanUtilities::CommandPoolWrapper
DEFINE_VULKAN_OBJECT_WRAPPER(CommandPool) CommandPoolWrapper
Definition: VulkanLogicalDevice.hpp:68
Diligent::RESOURCE_STATE
RESOURCE_STATE
Resource usage state.
Definition: GraphicsTypes.h:2814
Diligent::VulkanDynamicMemoryManager
Definition: VulkanDynamicHeap.hpp:117
Diligent::RenderDeviceVkImpl::CreateFramebuffer
virtual void CreateFramebuffer(const FramebufferDesc &Desc, IFramebuffer **ppFramebuffer) override final
Implementation of IRenderDevice::CreateFramebuffer() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:711
Diligent::BufferData
Describes the buffer initial data.
Definition: Buffer.h:155
DescriptorPoolManager.hpp
Diligent::BottomLevelASDesc
Bottom-level AS description.
Definition: BottomLevelAS.h:145
Diligent::RenderDeviceVkImpl::CreateRayTracingPipelineState
virtual void CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override final
Implementation of IRenderDevice::CreateRayTracingPipelineState() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:638
Diligent::IEngineFactory
Engine factory base interface.
Definition: EngineFactory.h:60
Diligent::EngineVkCreateInfo
Attributes specific to Vulkan engine.
Definition: GraphicsTypes.h:2282
Diligent::RenderDeviceVkImpl::CreateTLASFromVulkanResource
virtual void CreateTLASFromVulkanResource(VkAccelerationStructureKHR vkTLAS, const TopLevelASDesc &Desc, RESOURCE_STATE InitialState, ITopLevelAS **ppTLAS) override final
Implementation of IRenderDeviceVk::CreateTLASFromVulkanResource().
Definition: RenderDeviceVkImpl.cpp:730
Diligent::RenderDeviceVkImpl::CreateRenderPass
virtual void CreateRenderPass(const RenderPassDesc &Desc, IRenderPass **ppRenderPass) override final
Implementation of IRenderDevice::CreateRenderPass() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:706
Diligent::FenceDesc
Fence description.
Definition: Fence.h:43
Diligent::RenderDeviceVkImpl::~RenderDeviceVkImpl
~RenderDeviceVkImpl()
Definition: RenderDeviceVkImpl.cpp:273
VulkanPhysicalDevice.hpp
Diligent::ITexture
Texture inteface.
Definition: Texture.h:273
VulkanUtilities::VulkanMemoryAllocation
Definition: VulkanMemoryManager.hpp:48
VulkanMemoryManager.hpp
Diligent::RenderDeviceVkImpl::CreateBLASFromVulkanResource
virtual void CreateBLASFromVulkanResource(VkAccelerationStructureKHR vkBLAS, const BottomLevelASDesc &Desc, RESOURCE_STATE InitialState, IBottomLevelAS **ppBLAS) override final
Implementation of IRenderDeviceVk::CreateBLASFromVulkanResource().
Definition: RenderDeviceVkImpl.cpp:716
Diligent::IRenderPass
Render pass interface.
Definition: RenderPass.h:369
Diligent
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
Diligent::RenderDeviceVkImpl::CreateFence
virtual void CreateFence(const FenceDesc &Desc, IFence **ppFence) override final
Implementation of IRenderDevice::CreateFence() in Vulkan backend.
Definition: RenderDeviceVkImpl.cpp:689
Diligent::RenderDeviceVkImpl::GetLogicalDevice
const VulkanUtilities::VulkanLogicalDevice & GetLogicalDevice()
Definition: RenderDeviceVkImpl.hpp:200
VulkanInstance.hpp
Diligent::RenderDeviceVkImpl::FlushStaleResources
void FlushStaleResources(Uint32 CmdQueueIndex)
Definition: RenderDeviceVkImpl.cpp:501