XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGALDeviceVulkan Class Referencefinal
Inheritance diagram for xiiGALDeviceVulkan:
[legend]

Classes

struct  InstanceFlags
struct  ExtensionFeatures
struct  ExtensionProperties

Public Types

enum class  DebugMode { Disabled , Utils , Report }

Public Member Functions

virtual xiiGALCommandQueue * GetCommandQueue (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const override final
virtual void SetDebugNamePlatform (xiiStringView sName) const override final
template<typename ObjectHandle, typename = typename std::enable_if<std::is_object<ObjectHandle>::value>::type>
XII_FORCE_INLINE void SetVulkanObjectDebugName (ObjectHandle &vkObject, const char *szDebugName, xiiVulkanAllocation allocation={}) const
 Copyright (c) Theophilus Eriata. All Rights Reserved.
template<typename T, typename = std::enable_if_t<std::is_class_v<T> && HasObjectType<T>::value>>
XII_FORCE_INLINE void SafeReleaseDeviceObject (T &&vkObject, xiiVulkanAllocation &&allocation=nullptr, vk::DeviceMemory &&vkExternalMemory=nullptr)
template<typename T>
XII_ALWAYS_INLINE void ReclaimLater (T &&vkObject)
XII_ALWAYS_INLINE xiiVulkanMemoryAllocator * GetVulkanMemoryAllocator () const
XII_ALWAYS_INLINE vk::Instance GetVulkanInstance () const
XII_ALWAYS_INLINE xiiUInt32 GetVulkanVersion () const
XII_ALWAYS_INLINE const vk::detail::DispatchLoaderDynamic & GetVulkanDynamicDispatchLoader () const
XII_ALWAYS_INLINE const xiiGALDeviceVulkan::InstanceFlags & GetVulkanInstanceFlags () const
XII_ALWAYS_INLINE xiiArrayPtr< const char *const > GetVulkanInstanceEnabledExtensions () const
XII_ALWAYS_INLINE vk::PhysicalDevice GetVulkanPhysicalDevice () const
XII_ALWAYS_INLINE const vk::PhysicalDeviceProperties & GetVulkanPhysicalDeviceProperties () const
XII_ALWAYS_INLINE const vk::PhysicalDeviceFeatures & GetVulkanPhysicalDeviceFeatures () const
XII_ALWAYS_INLINE const vk::PhysicalDeviceMemoryProperties & GetVulkanPhysicalDeviceMemoryProperties () const
XII_ALWAYS_INLINE xiiArrayPtr< const vk::QueueFamilyProperties > GetPhysicalDeviceQueueFamilyProperties () const
XII_ALWAYS_INLINE xiiArrayPtr< const xiiUInt32 > GetActiveQueueFamilyIndices () const
XII_ALWAYS_INLINE xiiArrayPtr< const vk::ExtensionProperties > GetPhysicalDeviceSupportedExtensions () const
XII_ALWAYS_INLINE const xiiGALDeviceVulkan::ExtensionFeatures & GetPhysicalDeviceExtensionFeatures () const
XII_ALWAYS_INLINE const xiiGALDeviceVulkan::ExtensionProperties & GetPhysicalDeviceExtensionProperties () const
XII_ALWAYS_INLINE vk::Device GetVulkanLogicalDevice () const
XII_ALWAYS_INLINE const vk::PhysicalDeviceFeatures & GetVulkanLogicalDeviceFeatures () const
XII_ALWAYS_INLINE const xiiGALDeviceVulkan::ExtensionFeatures & GetVulkanLogicalDeviceExtensionFeatures () const
XII_ALWAYS_INLINE xiiArrayPtr< const vk::PipelineStageFlags > GetVulkanLogicalDeviceSupportedStagesFlags () const
XII_ALWAYS_INLINE vk::PipelineStageFlags GetVulkanLogicalDeviceSupportedStagesFlags (xiiUInt32 uiQueueFamilyIndex) const
XII_ALWAYS_INLINE xiiArrayPtr< const vk::AccessFlags > GetVulkanLogicalDeviceSupportedAccessFlags () const
XII_ALWAYS_INLINE vk::AccessFlags GetVulkanLogicalDeviceSupportedAccessFlags (xiiUInt32 uiQueueFamilyIndex) const
XII_ALWAYS_INLINE void LockCommandQueueAndRun (xiiBitflags< xiiGALCommandQueueFlags > queueFlags, xiiDelegate< void(const vk::Queue &)> action)
XII_ALWAYS_INLINE const xiiGALQueueInformationVulkan & GetCommandQueueInformation (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
XII_ALWAYS_INLINE xiiMutex & GetCommandQueueMutex (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
XII_ALWAYS_INLINE xiiGALCommandBufferPoolVulkan * GetCommandBufferPool (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
XII_ALWAYS_INLINE xiiGALQueryPoolVulkan * GetCommandQueueQueryPool (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
XII_ALWAYS_INLINE vk::PipelineStageFlags GetSupportedStagesFlags (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
XII_ALWAYS_INLINE vk::AccessFlags GetSupportedAccessFlags (xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
XII_ALWAYS_INLINE xiiGALDeviceVulkan::DebugMode GetDebugMode () const
XII_ALWAYS_INLINE xiiGALFencePoolVulkan * GetVulkanFencePool () const
XII_ALWAYS_INLINE xiiGALSemaphorePoolVulkan * GetVulkanSemaphorePool () const
template<typename T, typename>
XII_ALWAYS_INLINE void SafeReleaseDeviceObject (T &&vkObject, xiiVulkanAllocation &&allocation, vk::DeviceMemory &&vkExternalMemory)
Public Member Functions inherited from xiiGALDevice
xiiResult Initialize ()
 Initialize device.
void BeginFrame ()
 Begins a render frame.
void EndFrame ()
 Ends a render frame.
void WaitIdle ()
const xiiGALDeviceCreationDescription & GetDescription () const
 Returns the creation description for this device.
XII_ALWAYS_INLINE xiiAllocator * GetAllocator ()
const xiiGALGraphicsDeviceAdapterDescription & GetGraphicsDeviceAdapterProperties () const
 This retrieves the device properties. See xiiGraphicsDeviceAdapterDescription.
const xiiGALDeviceFeatures & GetFeatures () const
 This retrieves the device feature states. See xiiGALDeviceFeatures.
const xiiGALDeviceLimits & GetLimits () const
 This retrieves the device limits. See xiiGALDeviceLimits.
xiiEnum< xiiGALGraphicsDeviceType > GetGraphicsDeviceType () const
 This retrieves the device graphics API type. See xiiGALGraphicsDeviceType.
xiiMutex & GetMutex () const
 This returns critical section lock.
xiiSharedPtr< xiiGALSwapChain > CreateSwapChain (const xiiGALSwapChainCreationDescription &description)
xiiSharedPtr< xiiGALCommandList > CreateCommandList (const xiiGALCommandListCreationDescription &description)
xiiSharedPtr< xiiGALBlendState > CreateBlendState (const xiiGALBlendStateCreationDescription &description)
xiiSharedPtr< xiiGALDepthStencilState > CreateDepthStencilState (const xiiGALDepthStencilStateCreationDescription &description)
xiiSharedPtr< xiiGALRasterizerState > CreateRasterizerState (const xiiGALRasterizerStateCreationDescription &description)
xiiSharedPtr< xiiGALShader > CreateShader (const xiiGALShaderCreationDescription &description)
xiiSharedPtr< xiiGALBuffer > CreateBuffer (const xiiGALBufferCreationDescription &description, const xiiGALBufferData *pInitialData=nullptr, xiiBitflags< xiiGALExternalMemoryKind > externalMemoryKind=xiiGALExternalMemoryKind::None)
xiiSharedPtr< xiiGALTexture > CreateTexture (const xiiGALTextureCreationDescription &description, const xiiGALTextureData *pInitialData=nullptr, xiiBitflags< xiiGALExternalMemoryKind > externalMemoryKind=xiiGALExternalMemoryKind::None)
xiiSharedPtr< xiiGALSampler > CreateSampler (const xiiGALSamplerCreationDescription &description)
xiiSharedPtr< xiiGALQuery > CreateQuery (const xiiGALQueryCreationDescription &description)
xiiSharedPtr< xiiGALFence > CreateFence (const xiiGALFenceCreationDescription &description)
xiiSharedPtr< xiiGALRenderPass > CreateRenderPass (const xiiGALRenderPassCreationDescription &description)
xiiSharedPtr< xiiGALFramebuffer > CreateFramebuffer (const xiiGALFramebufferCreationDescription &description)
xiiSharedPtr< xiiGALBottomLevelAS > CreateBottomLevelAS (const xiiGALBottomLevelASCreationDescription &description)
xiiSharedPtr< xiiGALTopLevelAS > CreateTopLevelAS (const xiiGALTopLevelASCreationDescription &description)
xiiSharedPtr< xiiGALPipelineResourceSignature > CreatePipelineResourceSignature (xiiGALPipelineResourceSignatureCreationDescription &description)
xiiSharedPtr< xiiGALGraphicsPipelineState > CreateGraphicsPipelineState (const xiiGALGraphicsPipelineStateCreationDescription &description)
xiiSharedPtr< xiiGALComputePipelineState > CreateComputePipelineState (const xiiGALComputePipelineStateCreationDescription &description)
xiiSharedPtr< xiiGALRayTracingPipelineState > CreateRayTracingPipelineState (const xiiGALRayTracingPipelineStateCreationDescription &description)
xiiSharedPtr< xiiGALTilePipelineState > CreateTilePipelineState (const xiiGALTilePipelineStateCreationDescription &description)
Public Member Functions inherited from xiiGALObject
XII_ALWAYS_INLINE xiiStringView GetDebugName () const
 Returns the debug name of this resource.
void SetDebugName (xiiStringView sDebugName) const
 Sets the debug name for this resource.
Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTI * GetDynamicRTTI () const
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
Public Member Functions inherited from xiiRefCounted
virtual ~xiiRefCounted ()=default
 Adds a virtual destructor.
Public Member Functions inherited from xiiRefCountingImpl
 xiiRefCountingImpl ()=default
 Constructor.
 xiiRefCountingImpl (const xiiRefCountingImpl &rhs)
void operator= (const xiiRefCountingImpl &rhs)
xiiUInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
bool TryAddRef () const
xiiUInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.ywat.
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
xiiUInt32 GetRefCount () const
 Returns the current reference count.

Friends

class xiiMemoryUtils
xiiInternal::NewInstance< xiiGALDevice > CreateVulkanDevice (xiiAllocator *pAllocator, const xiiGALDeviceCreationDescription &description)

Additional Inherited Members

Static Public Member Functions inherited from xiiGALDevice
static xiiEvent< const xiiGALDeviceEvent &, xiiMutex > & GetEvents ()
 Registers event handlers.
static bool IsRegistryInitialized ()
 Returns whether the process-wide device registry is owned by a running subsystem.
static void SetDefaultDevice (xiiSharedPtr< xiiGALDevice > pDefaultDevice)
 Sets a default graphics device.
static xiiSharedPtr< xiiGALDevice > GetDefaultDevice ()
 Retrieves the default device. This will be nullptr if none is set.
static bool HasDefaultDevice ()
 This returns true if there is a set default device.
Static Public Member Functions inherited from xiiNoBase
static const xiiRTTI * GetStaticRTTI ()
Protected Member Functions inherited from xiiGALDevice
 xiiGALDevice (xiiAllocator *pAllocator, const xiiGALDeviceCreationDescription &creationDescription)
xiiResult PostInitialize ()
 Initialization after device capabilities are known.
void VerifyMultithreadedAccess () const
 Asserts that either this device supports multi-threaded resource creation, or that this function is executed on the main thread.
Protected Member Functions inherited from xiiGALObject
 xiiGALObject ()
 Copyright (c) Theophilus Eriata. All Rights Reserved.
Protected Attributes inherited from xiiGALDevice
xiiGALDeviceCreationDescription m_Description
xiiProxyAllocator m_Allocator
xiiLocalAllocatorWrapper m_AllocatorWrapper
xiiMutex m_Mutex
xiiGALGraphicsDeviceAdapterDescription m_AdapterDescription

Member Function Documentation

◆ GetActiveQueueFamilyIndices()

XII_ALWAYS_INLINE xiiArrayPtr< const xiiUInt32 > xiiGALDeviceVulkan::GetActiveQueueFamilyIndices ( ) const
inlinenodiscard

Queue families that may execute engine command lists. Resources shared by the render graph use this list with VK_SHARING_MODE_CONCURRENT, which avoids implicit ownership assumptions when dedicated compute/transfer families are available.

◆ GetCommandQueue()

xiiGALCommandQueue * xiiGALDeviceVulkan::GetCommandQueue ( xiiBitflags< xiiGALCommandQueueFlags > queueFlags) const
finaloverridevirtual

Retrieves a pointer to the compute queue if available, null otherwise.

Parameters
queueType- The queue type that has the required feature.
Note
The default graphics queue is guaranteed to exist, for a successful device initialization.

Implements xiiGALDevice.

◆ SetDebugNamePlatform()

void xiiGALDeviceVulkan::SetDebugNamePlatform ( xiiStringView sName) const
finaloverridevirtual

Reimplemented from xiiGALObject.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsVulkan/Device/DeviceVulkan.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsVulkan/Device/Implementation/DeviceVulkan.cpp
  • /home/runner/work/XII/XII/Source/Engine/GraphicsVulkan/Device/Implementation/DeviceVulkan_inl.h