Foundation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Attributes | List of all members
Foundation::RHI::RHIDevice Class Referenceabstract

#include <Device.hpp>

Inheritance diagram for Foundation::RHI::RHIDevice:
Foundation::RHI::RHIObject Foundation::RHI::VulkanDevice

Classes

struct  DeviceDesc
 

Public Member Functions

 RHIDevice (RHIApplication const &app)
 
virtual Span< RHIResourceFormat constGetSwapchainSupportedFormats () const =0
 
virtual Span< RHISwapchainPresentMode constGetSwapchainSupportedPresentModes () const =0
 
virtual RHIDeviceScopedHandle< RHISwapchainCreateSwapchain (RHISwapchain::SwapchainDesc const &desc)=0
 
virtual RHISwapchainGetSwapchain (Handle handle) const =0
 
virtual void DestroySwapchain (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIPipelineStateCacheCreatePipelineCache (RHIPipelineStateCache::PipelineStateCacheDesc const &desc)=0
 
virtual RHIPipelineStateCacheGetPipelineCache (Handle handle) const =0
 
virtual void DestroyPipelineCache (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIPipelineStateCreatePipelineState (RHIPipelineState::PipelineStateDesc const &desc)=0
 
virtual RHIPipelineStateGetPipelineState (Handle handle) const =0
 
virtual void DestroyPipelineState (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIShaderModuleCreateShaderModule (RHIShaderModule::ShaderModuleDesc const &desc)=0
 
virtual RHIShaderModuleGetShaderModule (Handle handle) const =0
 
virtual void DestroyShaderModule (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHICommandPoolCreateCommandPool (RHICommandPool::PoolDesc type)=0
 
virtual RHICommandPoolGetCommandPool (Handle handle) const =0
 
virtual void DestroyCommandPool (Handle handle)=0
 
virtual RHIDeviceQueueGetDeviceQueue (RHIDeviceQueueType type) const =0
 
virtual RHIDeviceScopedHandle< RHIDeviceSemaphoreCreateSemaphore (bool is_timeline=false)=0
 
virtual RHIDeviceSemaphoreGetSemaphore (Handle handle) const =0
 
virtual void DestroySemaphore (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIDeviceFenceCreateFence (bool signaled=true)=0
 
virtual RHIDeviceFenceGetFence (Handle handle) const =0
 
virtual void DestroyFence (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIBufferCreateBuffer (RHIBufferDesc const &desc)=0
 
virtual RHIBufferGetBuffer (Handle handle) const =0
 
virtual void DestroyBuffer (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHITextureCreateTexture (RHITextureDesc const &desc)=0
 
virtual RHITextureGetImage (Handle handle) const =0
 
virtual void DestroyImage (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIDeviceDescriptorSetLayoutCreateDescriptorSetLayout (RHIDeviceDescriptorSetLayoutDesc const &desc)=0
 
virtual RHIDeviceDescriptorSetLayoutGetDescriptorSetLayout (Handle handle) const =0
 
virtual void DestroyDescriptorSetLayout (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIDeviceDescriptorPoolCreateDescriptorPool (RHIDeviceDescriptorPool::PoolDesc const &desc)=0
 
virtual RHIDeviceDescriptorPoolGetDescriptorPool (Handle handle) const =0
 
virtual void DestroyDescriptorPool (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIDeviceSamplerCreateSampler (RHIDeviceSampler::SamplerDesc const &desc)=0
 
virtual RHIDeviceSamplerGetSampler (Handle handle) const =0
 
virtual void DestroySampler (Handle handle)=0
 
virtual RHIDeviceScopedHandle< RHIDeviceQueryPoolCreateQueryPool (RHIDeviceQueryPool::QueryPoolDesc const &desc)=0
 
virtual RHIDeviceQueryPoolGetQueryPool (Handle handle) const =0
 
virtual void DestroyQueryPool (Handle handle)=0
 
virtual void ResetFences (Span< RHIDeviceFence *const > fences)=0
 
virtual bool WaitForFences (Span< RHIDeviceFence *const > fences, bool wait_all, size_t timeout)=0
 Wait for fences to arrive.
 
virtual void SignalTimelineSemaphores (Span< const Pair< RHIDeviceSemaphore *, size_t > > semaphores)=0
 
virtual bool WaitForTimelineSemaphores (Span< const Pair< RHIDeviceSemaphore *, size_t > > semaphores, size_t timeout)=0
 Wait for timeline semaphores to reach specified values.
 
virtual void WaitIdle () const =0
 
virtual void QueryBudget (size_t &used, size_t &budget) const =0
 
virtual String QueryDeviceString () const =0
 
virtual void DebugSetObjectName (const char *name)=0
 
- Public Member Functions inherited from Foundation::RHI::RHIObject
 RHIObject ()=default
 
 RHIObject (RHIObject const &)=delete
 
RHIObjectoperator= (const RHIObject &)=delete
 
 RHIObject (RHIObject &&)=delete
 
RHIObjectoperator= (RHIObject &&)=delete
 
virtual ~RHIObject ()=default
 

Protected Attributes

const RHIApplicationmApp
 

Constructor & Destructor Documentation

◆ RHIDevice()

Foundation::RHI::RHIDevice::RHIDevice ( RHIApplication const app)
inline

Member Function Documentation

◆ CreateBuffer()

virtual RHIDeviceScopedHandle< RHIBuffer > Foundation::RHI::RHIDevice::CreateBuffer ( RHIBufferDesc const desc)
pure virtual

◆ CreateCommandPool()

virtual RHIDeviceScopedHandle< RHICommandPool > Foundation::RHI::RHIDevice::CreateCommandPool ( RHICommandPool::PoolDesc  type)
pure virtual

◆ CreateDescriptorPool()

virtual RHIDeviceScopedHandle< RHIDeviceDescriptorPool > Foundation::RHI::RHIDevice::CreateDescriptorPool ( RHIDeviceDescriptorPool::PoolDesc const desc)
pure virtual

◆ CreateDescriptorSetLayout()

virtual RHIDeviceScopedHandle< RHIDeviceDescriptorSetLayout > Foundation::RHI::RHIDevice::CreateDescriptorSetLayout ( RHIDeviceDescriptorSetLayoutDesc const desc)
pure virtual

◆ CreateFence()

virtual RHIDeviceScopedHandle< RHIDeviceFence > Foundation::RHI::RHIDevice::CreateFence ( bool  signaled = true)
pure virtual

◆ CreatePipelineCache()

virtual RHIDeviceScopedHandle< RHIPipelineStateCache > Foundation::RHI::RHIDevice::CreatePipelineCache ( RHIPipelineStateCache::PipelineStateCacheDesc const desc)
pure virtual

◆ CreatePipelineState()

virtual RHIDeviceScopedHandle< RHIPipelineState > Foundation::RHI::RHIDevice::CreatePipelineState ( RHIPipelineState::PipelineStateDesc const desc)
pure virtual

◆ CreateQueryPool()

virtual RHIDeviceScopedHandle< RHIDeviceQueryPool > Foundation::RHI::RHIDevice::CreateQueryPool ( RHIDeviceQueryPool::QueryPoolDesc const desc)
pure virtual

◆ CreateSampler()

virtual RHIDeviceScopedHandle< RHIDeviceSampler > Foundation::RHI::RHIDevice::CreateSampler ( RHIDeviceSampler::SamplerDesc const desc)
pure virtual

◆ CreateSemaphore()

virtual RHIDeviceScopedHandle< RHIDeviceSemaphore > Foundation::RHI::RHIDevice::CreateSemaphore ( bool  is_timeline = false)
pure virtual

◆ CreateShaderModule()

virtual RHIDeviceScopedHandle< RHIShaderModule > Foundation::RHI::RHIDevice::CreateShaderModule ( RHIShaderModule::ShaderModuleDesc const desc)
pure virtual

◆ CreateSwapchain()

virtual RHIDeviceScopedHandle< RHISwapchain > Foundation::RHI::RHIDevice::CreateSwapchain ( RHISwapchain::SwapchainDesc const desc)
pure virtual

◆ CreateTexture()

virtual RHIDeviceScopedHandle< RHITexture > Foundation::RHI::RHIDevice::CreateTexture ( RHITextureDesc const desc)
pure virtual

◆ DebugSetObjectName()

virtual void Foundation::RHI::RHIDevice::DebugSetObjectName ( const char name)
pure virtual

◆ DestroyBuffer()

virtual void Foundation::RHI::RHIDevice::DestroyBuffer ( Handle  handle)
pure virtual

◆ DestroyCommandPool()

virtual void Foundation::RHI::RHIDevice::DestroyCommandPool ( Handle  handle)
pure virtual

◆ DestroyDescriptorPool()

virtual void Foundation::RHI::RHIDevice::DestroyDescriptorPool ( Handle  handle)
pure virtual

◆ DestroyDescriptorSetLayout()

virtual void Foundation::RHI::RHIDevice::DestroyDescriptorSetLayout ( Handle  handle)
pure virtual

◆ DestroyFence()

virtual void Foundation::RHI::RHIDevice::DestroyFence ( Handle  handle)
pure virtual

◆ DestroyImage()

virtual void Foundation::RHI::RHIDevice::DestroyImage ( Handle  handle)
pure virtual

◆ DestroyPipelineCache()

virtual void Foundation::RHI::RHIDevice::DestroyPipelineCache ( Handle  handle)
pure virtual

◆ DestroyPipelineState()

virtual void Foundation::RHI::RHIDevice::DestroyPipelineState ( Handle  handle)
pure virtual

◆ DestroyQueryPool()

virtual void Foundation::RHI::RHIDevice::DestroyQueryPool ( Handle  handle)
pure virtual

◆ DestroySampler()

virtual void Foundation::RHI::RHIDevice::DestroySampler ( Handle  handle)
pure virtual

◆ DestroySemaphore()

virtual void Foundation::RHI::RHIDevice::DestroySemaphore ( Handle  handle)
pure virtual

◆ DestroyShaderModule()

virtual void Foundation::RHI::RHIDevice::DestroyShaderModule ( Handle  handle)
pure virtual

◆ DestroySwapchain()

virtual void Foundation::RHI::RHIDevice::DestroySwapchain ( Handle  handle)
pure virtual

◆ GetBuffer()

virtual RHIBuffer * Foundation::RHI::RHIDevice::GetBuffer ( Handle  handle) const
pure virtual

◆ GetCommandPool()

virtual RHICommandPool * Foundation::RHI::RHIDevice::GetCommandPool ( Handle  handle) const
pure virtual

◆ GetDescriptorPool()

virtual RHIDeviceDescriptorPool * Foundation::RHI::RHIDevice::GetDescriptorPool ( Handle  handle) const
pure virtual

◆ GetDescriptorSetLayout()

virtual RHIDeviceDescriptorSetLayout * Foundation::RHI::RHIDevice::GetDescriptorSetLayout ( Handle  handle) const
pure virtual

◆ GetDeviceQueue()

virtual RHIDeviceQueue * Foundation::RHI::RHIDevice::GetDeviceQueue ( RHIDeviceQueueType  type) const
pure virtual

◆ GetFence()

virtual RHIDeviceFence * Foundation::RHI::RHIDevice::GetFence ( Handle  handle) const
pure virtual

◆ GetImage()

virtual RHITexture * Foundation::RHI::RHIDevice::GetImage ( Handle  handle) const
pure virtual

◆ GetPipelineCache()

virtual RHIPipelineStateCache * Foundation::RHI::RHIDevice::GetPipelineCache ( Handle  handle) const
pure virtual

◆ GetPipelineState()

virtual RHIPipelineState * Foundation::RHI::RHIDevice::GetPipelineState ( Handle  handle) const
pure virtual

◆ GetQueryPool()

virtual RHIDeviceQueryPool * Foundation::RHI::RHIDevice::GetQueryPool ( Handle  handle) const
pure virtual

◆ GetSampler()

virtual RHIDeviceSampler * Foundation::RHI::RHIDevice::GetSampler ( Handle  handle) const
pure virtual

◆ GetSemaphore()

virtual RHIDeviceSemaphore * Foundation::RHI::RHIDevice::GetSemaphore ( Handle  handle) const
pure virtual

◆ GetShaderModule()

virtual RHIShaderModule * Foundation::RHI::RHIDevice::GetShaderModule ( Handle  handle) const
pure virtual

◆ GetSwapchain()

virtual RHISwapchain * Foundation::RHI::RHIDevice::GetSwapchain ( Handle  handle) const
pure virtual

◆ GetSwapchainSupportedFormats()

virtual Span< RHIResourceFormat const > Foundation::RHI::RHIDevice::GetSwapchainSupportedFormats ( ) const
pure virtual

◆ GetSwapchainSupportedPresentModes()

virtual Span< RHISwapchainPresentMode const > Foundation::RHI::RHIDevice::GetSwapchainSupportedPresentModes ( ) const
pure virtual

◆ QueryBudget()

virtual void Foundation::RHI::RHIDevice::QueryBudget ( size_t used,
size_t budget 
) const
pure virtual

◆ QueryDeviceString()

virtual String Foundation::RHI::RHIDevice::QueryDeviceString ( ) const
pure virtual

◆ ResetFences()

virtual void Foundation::RHI::RHIDevice::ResetFences ( Span< RHIDeviceFence *const fences)
pure virtual

◆ SignalTimelineSemaphores()

virtual void Foundation::RHI::RHIDevice::SignalTimelineSemaphores ( Span< const Pair< RHIDeviceSemaphore *, size_t > >  semaphores)
pure virtual

◆ WaitForFences()

virtual bool Foundation::RHI::RHIDevice::WaitForFences ( Span< RHIDeviceFence *const fences,
bool  wait_all,
size_t  timeout 
)
pure virtual

Wait for fences to arrive.

Parameters
timeoutWait timeout in nanoseconds. Set to 0 for no wait and return immediately, -1 for infinite wait.
Returns
true if fence reached, false if timeout occurred.

Implemented in Foundation::RHI::VulkanDevice.

◆ WaitForTimelineSemaphores()

virtual bool Foundation::RHI::RHIDevice::WaitForTimelineSemaphores ( Span< const Pair< RHIDeviceSemaphore *, size_t > >  semaphores,
size_t  timeout 
)
pure virtual

Wait for timeline semaphores to reach specified values.

Parameters
timeoutWait timeout in nanoseconds. Set to 0 for no wait and return immediately.
Returns
true if all semaphores reached the specified values, false if timeout occurred.

Implemented in Foundation::RHI::VulkanDevice.

◆ WaitIdle()

virtual void Foundation::RHI::RHIDevice::WaitIdle ( ) const
pure virtual

Member Data Documentation

◆ mApp

const RHIApplication& Foundation::RHI::RHIDevice::mApp
protected

The documentation for this class was generated from the following file: