Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::IRenderDeviceVk Struct Referenceabstract

Exposes Vulkan-specific functionality of a render device. More...

#include <RenderDeviceVk.h>

Inheritance diagram for Diligent::IRenderDeviceVk:
Diligent.IRenderDevice Diligent.IObject

Public Member Functions

virtual VkDevice DILIGENT_CALL_TYPE GetVkDevice ()=0
 Returns a handle of the logical Vulkan device.
 
virtual VkPhysicalDevice DILIGENT_CALL_TYPE GetVkPhysicalDevice ()=0
 Returns a handle of the physical Vulkan device.
 
virtual VkInstance DILIGENT_CALL_TYPE GetVkInstance ()=0
 Returns Vulkan instance.
 
virtual Uint32 DILIGENT_CALL_TYPE GetVkVersion ()=0
 Returns Vulkan API version.
 
virtual void DILIGENT_CALL_TYPE CreateTextureFromVulkanImage (VkImage vkImage, const TextureDesc &TexDesc, RESOURCE_STATE InitialState, ITexture **ppTexture)=0
 Creates a texture object from native Vulkan image.
 
virtual void DILIGENT_CALL_TYPE CreateBufferFromVulkanResource (VkBuffer vkBuffer, const BufferDesc &BuffDesc, RESOURCE_STATE InitialState, IBuffer **ppBuffer)=0
 Creates a buffer object from native Vulkan resource.
 
virtual void DILIGENT_CALL_TYPE CreateBLASFromVulkanResource (VkAccelerationStructureKHR vkBLAS, const BottomLevelASDesc &Desc, RESOURCE_STATE InitialState, IBottomLevelAS **ppBLAS)=0
 Creates a bottom-level AS object from native Vulkan resource.
 
virtual void DILIGENT_CALL_TYPE CreateTLASFromVulkanResource (VkAccelerationStructureKHR vkTLAS, const TopLevelASDesc &Desc, RESOURCE_STATE InitialState, ITopLevelAS **ppTLAS)=0
 Creates a top-level AS object from native Vulkan resource.
 
virtual void DILIGENT_CALL_TYPE CreateFenceFromVulkanResource (VkSemaphore vkTimelineSemaphore, const FenceDesc &Desc, IFence **ppFence)=0
 Creates a fence object from native Vulkan resource.
 
virtual void DILIGENT_CALL_TYPE GetDeviceFeaturesVk (DeviceFeaturesVk &FeaturesVk) const =0
 Returns Vulkan-specific device features, see Diligent::DeviceFeaturesVk.
 
- Public Member Functions inherited from Diligent.IRenderDevice
virtual void DILIGENT_CALL_TYPE CreateBuffer (const BufferDesc &BuffDesc, const BufferData *pBuffData, IBuffer **ppBuffer)=0
 Creates a new buffer object.
 
virtual void DILIGENT_CALL_TYPE CreateShader (const ShaderCreateInfo &ShaderCI, IShader **ppShader, IDataBlob **ppCompilerOutput=nullptr)=0
 Creates a new shader object.
 
virtual void DILIGENT_CALL_TYPE CreateTexture (const TextureDesc &TexDesc, const TextureData *pData, ITexture **ppTexture)=0
 Creates a new texture object.
 
virtual void DILIGENT_CALL_TYPE CreateSampler (const SamplerDesc &SamDesc, ISampler **ppSampler)=0
 Creates a new sampler object.
 
virtual void DILIGENT_CALL_TYPE CreateResourceMapping (const ResourceMappingCreateInfo &ResMappingCI, IResourceMapping **ppMapping)=0
 Creates a new resource mapping.
 
virtual void DILIGENT_CALL_TYPE CreateGraphicsPipelineState (const GraphicsPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0
 Creates a new graphics pipeline state object.
 
virtual void DILIGENT_CALL_TYPE CreateComputePipelineState (const ComputePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0
 Creates a new compute pipeline state object.
 
virtual void DILIGENT_CALL_TYPE CreateRayTracingPipelineState (const RayTracingPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0
 Creates a new ray tracing pipeline state object.
 
virtual void DILIGENT_CALL_TYPE CreateTilePipelineState (const TilePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0
 Creates a new tile pipeline state object.
 
virtual void DILIGENT_CALL_TYPE CreateFence (const FenceDesc &Desc, IFence **ppFence)=0
 Creates a new fence object.
 
virtual void DILIGENT_CALL_TYPE CreateQuery (const QueryDesc &Desc, IQuery **ppQuery)=0
 Creates a new query object.
 
virtual void DILIGENT_CALL_TYPE CreateRenderPass (const RenderPassDesc &Desc, IRenderPass **ppRenderPass)=0
 Creates a render pass object.
 
virtual void DILIGENT_CALL_TYPE CreateFramebuffer (const FramebufferDesc &Desc, IFramebuffer **ppFramebuffer)=0
 Creates a framebuffer object.
 
virtual void DILIGENT_CALL_TYPE CreateBLAS (const BottomLevelASDesc &Desc, IBottomLevelAS **ppBLAS)=0
 Creates a bottom-level acceleration structure object (BLAS).
 
virtual void DILIGENT_CALL_TYPE CreateTLAS (const TopLevelASDesc &Desc, ITopLevelAS **ppTLAS)=0
 Creates a top-level acceleration structure object (TLAS).
 
virtual void DILIGENT_CALL_TYPE CreateSBT (const ShaderBindingTableDesc &Desc, IShaderBindingTable **ppSBT)=0
 Creates a shader resource binding table object (SBT).
 
virtual void DILIGENT_CALL_TYPE CreatePipelineResourceSignature (const PipelineResourceSignatureDesc &Desc, IPipelineResourceSignature **ppSignature)=0
 Creates a pipeline resource signature object.
 
virtual void DILIGENT_CALL_TYPE CreateDeviceMemory (const DeviceMemoryCreateInfo &CreateInfo, IDeviceMemory **ppMemory)=0
 Creates a device memory object.
 
virtual void DILIGENT_CALL_TYPE CreatePipelineStateCache (const PipelineStateCacheCreateInfo &CreateInfo, IPipelineStateCache **ppPSOCache)=0
 Creates a pipeline state cache object.
 
virtual void DILIGENT_CALL_TYPE CreateDeferredContext (IDeviceContext **ppContext)=0
 Creates a deferred context.
 
virtual const RenderDeviceInfo &DILIGENT_CALL_TYPE GetDeviceInfo () const =0
 Returns the device information, see Diligent::RenderDeviceInfo for details.
 
virtual const GraphicsAdapterInfo &DILIGENT_CALL_TYPE GetAdapterInfo () const =0
 Returns the graphics adapter information, see Diligent::GraphicsAdapterInfo for details.
 
virtual const TextureFormatInfo &DILIGENT_CALL_TYPE GetTextureFormatInfo (TEXTURE_FORMAT TexFormat) const =0
 Returns the basic texture format information.
 
virtual const TextureFormatInfoExt &DILIGENT_CALL_TYPE GetTextureFormatInfoExt (TEXTURE_FORMAT TexFormat)=0
 Returns the extended texture format information.
 
virtual SparseTextureFormatInfo DILIGENT_CALL_TYPE GetSparseTextureFormatInfo (TEXTURE_FORMAT TexFormat, RESOURCE_DIMENSION Dimension, Uint32 SampleCount) const =0
 Returns the sparse texture format info for the given texture format, resource dimension and sample count.
 
virtual void DILIGENT_CALL_TYPE ReleaseStaleResources (Bool ForceRelease=false)=0
 
virtual void DILIGENT_CALL_TYPE IdleGPU ()=0
 Waits until all outstanding operations on the GPU are complete.
 
virtual IEngineFactory *DILIGENT_CALL_TYPE GetEngineFactory () const =0
 Returns engine factory this device was created from.
 
virtual IThreadPool *DILIGENT_CALL_TYPE GetShaderCompilationThreadPool () const =0
 Returns a pointer to the shader compilation thread pool.
 
void CreatePipelineState (const GraphicsPipelineStateCreateInfo &CI, IPipelineState **ppPipelineState)
 Overloaded alias for CreateGraphicsPipelineState.
 
void CreatePipelineState (const ComputePipelineStateCreateInfo &CI, IPipelineState **ppPipelineState)
 Overloaded alias for CreateComputePipelineState.
 
void CreatePipelineState (const RayTracingPipelineStateCreateInfo &CI, IPipelineState **ppPipelineState)
 Overloaded alias for CreateRayTracingPipelineState.
 
void CreatePipelineState (const TilePipelineStateCreateInfo &CI, IPipelineState **ppPipelineState)
 Overloaded alias for CreateTilePipelineState.
 
- Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
 
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0
 

Detailed Description

Exposes Vulkan-specific functionality of a render device.

Member Function Documentation

◆ CreateBLASFromVulkanResource()

virtual void DILIGENT_CALL_TYPE Diligent::IRenderDeviceVk::CreateBLASFromVulkanResource ( VkAccelerationStructureKHR vkBLAS,
const BottomLevelASDesc & Desc,
RESOURCE_STATE InitialState,
IBottomLevelAS ** ppBLAS )
pure virtual

Creates a bottom-level AS object from native Vulkan resource.

Parameters
[in]vkBLAS- Vulkan acceleration structure handle.
[in]Desc- Bottom-level AS description.
[in]InitialState- Initial BLAS state. Can be RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_BUILD_AS_READ, RESOURCE_STATE_BUILD_AS_WRITE. See Diligent::RESOURCE_STATE.
[out]ppBLAS- Address of the memory location where the pointer to the bottom-level AS interface will be stored. The function calls AddRef(), so that the new object will contain one reference.
Note
Created bottom-level AS object does not take ownership of the Vulkan acceleration structure and will not destroy it once released. The application must not destroy Vulkan acceleration structure while it is in use by the engine.

◆ CreateBufferFromVulkanResource()

virtual void DILIGENT_CALL_TYPE Diligent::IRenderDeviceVk::CreateBufferFromVulkanResource ( VkBuffer vkBuffer,
const BufferDesc & BuffDesc,
RESOURCE_STATE InitialState,
IBuffer ** ppBuffer )
pure virtual

Creates a buffer object from native Vulkan resource.

Parameters
[in]vkBuffer- Vulkan buffer handle
[in]BuffDesc- Buffer description. Vulkan provides no means to retrieve any buffer properties from the buffer handle, so complete buffer description must be provided
[in]InitialState- Initial buffer state. See Diligent::RESOURCE_STATE.
[out]ppBuffer- Address of the memory location where the pointer to the buffer interface will be stored. The function calls AddRef(), so that the new object will contain one reference.
Note
Created buffer object does not take ownership of the Vulkan buffer and will not destroy it once released. The application must not destroy Vulkan buffer while it is in use by the engine.

◆ CreateFenceFromVulkanResource()

virtual void DILIGENT_CALL_TYPE Diligent::IRenderDeviceVk::CreateFenceFromVulkanResource ( VkSemaphore vkTimelineSemaphore,
const FenceDesc & Desc,
IFence ** ppFence )
pure virtual

Creates a fence object from native Vulkan resource.

Parameters
[in]vkTimelineSemaphore- Vulkan timeline semaphore handle.
[in]Desc- Fence description.
[out]ppFence- Address of the memory location where the pointer to the fence interface will be stored. The function calls AddRef(), so that the new object will contain one reference.
Note
Created fence object does not take ownership of the Vulkan semaphore and will not destroy it once released. The application must not destroy Vulkan semaphore while it is in use by the engine.

◆ CreateTextureFromVulkanImage()

virtual void DILIGENT_CALL_TYPE Diligent::IRenderDeviceVk::CreateTextureFromVulkanImage ( VkImage vkImage,
const TextureDesc & TexDesc,
RESOURCE_STATE InitialState,
ITexture ** ppTexture )
pure virtual

Creates a texture object from native Vulkan image.

Parameters
[in]vkImage- Vulkan image handle
[in]TexDesc- Texture description. Vulkan provides no means to retrieve any image properties from the image handle, so complete texture description must be provided
[in]InitialState- Initial texture state. See Diligent::RESOURCE_STATE.
[out]ppTexture- Address of the memory location where the pointer to the texture interface will be stored. The function calls AddRef(), so that the new object will contain one reference.
Note
Created texture object does not take ownership of the Vulkan image and will not destroy it once released. The application must not destroy the image while it is in use by the engine.

◆ CreateTLASFromVulkanResource()

virtual void DILIGENT_CALL_TYPE Diligent::IRenderDeviceVk::CreateTLASFromVulkanResource ( VkAccelerationStructureKHR vkTLAS,
const TopLevelASDesc & Desc,
RESOURCE_STATE InitialState,
ITopLevelAS ** ppTLAS )
pure virtual

Creates a top-level AS object from native Vulkan resource.

Parameters
[in]vkTLAS- Vulkan acceleration structure handle.
[in]Desc- Bottom-level AS description.
[in]InitialState- Initial TLAS state. Can be RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_BUILD_AS_READ, RESOURCE_STATE_BUILD_AS_WRITE, RESOURCE_STATE_RAY_TRACING. See Diligent::RESOURCE_STATE.
[out]ppTLAS- Address of the memory location where the pointer to the top-level AS interface will be stored. The function calls AddRef(), so that the new object will contain one reference.
Note
Created top-level AS object does not take ownership of the Vulkan acceleration structure and will not destroy it once released. The application must not destroy Vulkan acceleration structure while it is in use by the engine.

◆ GetVkVersion()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IRenderDeviceVk::GetVkVersion ( )
pure virtual

Returns Vulkan API version.

Note
This version is the minimum of the instance version and what the physical device supports.