11 class RHIDeviceSemaphore;
221 return device->GetSwapchain(handle);
224 device->DestroySwapchain(handle);
229 return device->GetPipelineState(handle);
232 device->DestroyPipelineState(handle);
237 return device->GetShaderModule(handle);
240 device->DestroyShaderModule(handle);
245 return device->GetCommandPool(handle);
248 device->DestroyCommandPool(handle);
253 return device->GetSemaphore(handle);
256 device->DestroySemaphore(handle);
261 return device->GetFence(handle);
264 device->DestroyFence(handle);
269 return device->GetBuffer(handle);
272 device->DestroyBuffer(handle);
277 return device->GetImage(handle);
280 device->DestroyImage(handle);
285 return device->GetDescriptorSetLayout(handle);
288 device->DestroyDescriptorSetLayout(handle);
293 return device->GetDescriptorPool(handle);
296 device->DestroyDescriptorPool(handle);
301 return device->GetSampler(handle);
304 device->DestroySampler(handle);
std::span with relaxed constructors for pointer-aliasing types and common containers.
Definition Container.hpp:59
The root object of everything RHI. Implementation of this class inherently defines the RHI backend.
Definition Application.hpp:11
Definition Resource.hpp:30
Definition Command.hpp:13
Definition Descriptor.hpp:43
const RHIDeviceDescriptorSetLayoutDesc mDesc
Definition Device.hpp:81
RHIDeviceDescriptorSetLayout(RHIDevice const &device, RHIDeviceDescriptorSetLayoutDesc const &desc)
Definition Device.hpp:82
const RHIDevice & mDevice
Definition Device.hpp:79
virtual void DebugSetObjectName(const char *name)=0
const RHIDevice & mDevice
Definition Device.hpp:59
RHIDeviceFence(RHIDevice const &device)
Definition Device.hpp:61
virtual void DebugSetObjectName(const char *name)=0
virtual uint32_t GetQueueIndex() const =0
RHIDeviceQueue(RHIDevice const &device)
Definition Device.hpp:17
virtual void Submit(Span< const SubmitDesc > desc, RHIDeviceFence *completionFence=nullptr) const =0
virtual void DebugSetObjectName(const char *name)=0
Pair< RHIDeviceSemaphore *, size_t > TimelinePair
Definition Device.hpp:20
virtual void WaitIdle() const =0
virtual void Present(PresentDesc const &desc) const =0
const RHIDevice & mDevice
Definition Device.hpp:15
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc mDesc
const RHIDevice & mDevice
Definition Device.hpp:90
RHIDeviceSampler(RHIDevice const &device, SamplerDesc const &desc)
Definition Device.hpp:125
virtual void DebugSetObjectName(const char *name)=0
RHIDeviceSemaphore(RHIDevice const &device, bool is_timeline)
Definition Device.hpp:53
const RHIDevice & mDevice
Definition Device.hpp:50
const bool mIsTimeline
Definition Device.hpp:52
virtual void DebugSetObjectName(const char *name)=0
Definition Device.hpp:131
virtual RHIBuffer * GetBuffer(Handle handle) const =0
virtual RHIDeviceDescriptorPool * GetDescriptorPool(Handle handle) const =0
virtual void ResetFences(Span< const RHIDeviceObjectHandle< RHIDeviceFence > > fences)=0
virtual RHIDeviceScopedObjectHandle< RHICommandPool > CreateCommandPool(RHICommandPool::PoolDesc type)=0
virtual RHIDeviceSampler * GetSampler(Handle handle) const =0
virtual RHIPipelineState * GetPipelineState(Handle handle) const =0
virtual void WaitForFences(Span< const RHIDeviceObjectHandle< RHIDeviceFence > > fences, bool wait_all, size_t timeout)=0
virtual RHITexture * GetImage(Handle handle) const =0
virtual Span< RHISwapchainPresentMode const > GetSwapchainSupportedPresentModes() const =0
virtual RHIDeviceScopedObjectHandle< RHIDeviceSampler > CreateSampler(RHIDeviceSampler::SamplerDesc const &desc)=0
virtual RHIDeviceFence * GetFence(Handle handle) const =0
virtual void SignalTimelineSemaphores(Span< const Pair< RHIDeviceObjectHandle< RHIDeviceSemaphore >, size_t > > semaphores)=0
virtual RHISwapchain * GetSwapchain(Handle handle) const =0
virtual RHIDeviceScopedObjectHandle< RHIDeviceDescriptorSetLayout > CreateDescriptorSetLayout(RHIDeviceDescriptorSetLayoutDesc const &desc)=0
virtual void DestroyDescriptorPool(Handle handle)=0
virtual RHIDeviceScopedObjectHandle< RHIDeviceDescriptorPool > CreateDescriptorPool(RHIDeviceDescriptorPool::PoolDesc const &desc)=0
virtual void DestroyPipelineState(Handle handle)=0
const RHIApplication & mApp
Definition Device.hpp:133
virtual Span< RHIResourceFormat const > GetSwapchainSupportedFormats() const =0
virtual void DestroyShaderModule(Handle handle)=0
virtual RHIDeviceScopedObjectHandle< RHIPipelineState > CreatePipelineState(RHIPipelineState::PipelineStateDesc const &desc)=0
virtual RHIDeviceScopedObjectHandle< RHITexture > CreateTexture(RHITextureDesc const &desc)=0
virtual void DestroySemaphore(Handle handle)=0
virtual void DebugSetObjectName(const char *name)=0
virtual void DestroySampler(Handle handle)=0
virtual RHIDeviceScopedObjectHandle< RHIDeviceSemaphore > CreateSemaphore(bool is_timeline=false)=0
virtual void WaitIdle() const =0
virtual RHIDeviceSemaphore * GetSemaphore(Handle handle) const =0
virtual RHIShaderModule * GetShaderModule(Handle handle) const =0
virtual void DestroyImage(Handle handle)=0
virtual RHIDeviceScopedObjectHandle< RHIShaderModule > CreateShaderModule(RHIShaderModule::ShaderModuleDesc const &desc)=0
virtual RHIDeviceScopedObjectHandle< RHISwapchain > CreateSwapchain(RHISwapchain::SwapchainDesc const &desc)=0
virtual void DestroyBuffer(Handle handle)=0
virtual RHIDeviceScopedObjectHandle< RHIDeviceFence > CreateFence(bool signaled=true)=0
virtual void DestroyFence(Handle handle)=0
virtual RHICommandPool * GetCommandPool(Handle handle) const =0
virtual void DestroyDescriptorSetLayout(Handle handle)=0
virtual void DestroySwapchain(Handle handle)=0
virtual RHIDeviceDescriptorSetLayout * GetDescriptorSetLayout(Handle handle) const =0
virtual RHIDeviceQueue * GetDeviceQueue(RHIDeviceQueueType type) const =0
virtual RHIDeviceScopedObjectHandle< RHIBuffer > CreateBuffer(RHIBufferDesc const &desc)=0
virtual void DestroyCommandPool(Handle handle)=0
RHIDevice(RHIApplication const &app)
Definition Device.hpp:139
virtual void WaitForTimelineSemaphores(Span< const Pair< RHIDeviceObjectHandle< RHIDeviceSemaphore >, size_t > > semaphores, size_t timeout)=0
Base class for all RHI objects.
Definition Details.hpp:16
Definition PipelineState.hpp:7
Definition Swapchain.hpp:19
Definition Resource.hpp:146
std::pair< First, Second > Pair
Alias for std::pair
Definition Container.hpp:30
std::unique_ptr< T, StlDeleter< T > > UniquePtr
std::unique_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.
Definition Allocator.hpp:161
Low-level Rendering Hardware Interface (RHI) abstractions.
Definition Application.hpp:5
uint64_t Handle
Definition Details.hpp:9
RHIDescriptorType
Definition Common.hpp:116
RHIDeviceQueueType
Definition Common.hpp:69
Definition Resource.hpp:21
Definition Command.hpp:17
Definition Descriptor.hpp:47
RHIDescriptorType type
Definition Device.hpp:69
uint32_t count
Definition Device.hpp:67
RHIShaderStage stage
Definition Device.hpp:68
Span< const Binding > bindings
Definition Device.hpp:72
bool updateAfterBind
Definition Device.hpp:75
RAII guard to wait for device idle on destruction.
Definition Device.hpp:205
~RHIDeviceIdleGuard()
Definition Device.hpp:213
void WaitIdle() const
Definition Device.hpp:209
RHIDeviceIdleGuard(RHIDevice const *device)
Definition Device.hpp:208
RHIDeviceIdleGuard()=delete
RHIDevice const * mDevice
Definition Device.hpp:206
RHISwapchain * swapchain
Definition Device.hpp:39
Span< RHIDeviceSemaphore *const > waits
Definition Device.hpp:41
uint32_t imageIndex
Definition Device.hpp:38
Span< RHICommandList *const > cmdLists
Definition Device.hpp:33
Span< RHIDeviceSemaphore *const > signals
Definition Device.hpp:31
Span< const TimelinePair > timelineSignals
Definition Device.hpp:25
Span< RHIDeviceSemaphore *const > waits
Definition Device.hpp:27
Span< const TimelinePair > timelineWaits
Definition Device.hpp:23
Span< const RHIPipelineStage > waitsStages
Definition Device.hpp:29
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::AddressMode::Mode Repeat
Mode
Definition Device.hpp:98
@ ClampToBorder
Definition Device.hpp:102
@ ClampToEdge
Definition Device.hpp:101
@ MirroredRepeat
Definition Device.hpp:100
@ Repeat
Definition Device.hpp:99
@ MirrorClampToEdge
Definition Device.hpp:103
bool enable
Definition Device.hpp:94
float maxLevel
Definition Device.hpp:95
Definition Device.hpp:113
Type
Definition Device.hpp:114
@ Linear
Definition Device.hpp:116
@ NearestNeighbor
Definition Device.hpp:115
@ Cubic
Definition Device.hpp:117
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::Filter::Type Linear
Definition Device.hpp:120
float max
Definition Device.hpp:122
float min
Definition Device.hpp:121
Definition Device.hpp:106
float bias
Definition Device.hpp:111
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::Mipmap::MipmapMode Linear
MipmapMode
Definition Device.hpp:107
@ Nearest
Definition Device.hpp:109
@ Linear
Definition Device.hpp:108
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::LOD lod
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::Mipmap mipmap
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::Anisotropy anisotropy
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::AddressMode addressMode
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::Filter filter
Definition Device.hpp:135
const char * name
Definition Device.hpp:137
uint32_t id
Definition Device.hpp:136
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:271
static RHIBuffer * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:268
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:247
static RHICommandPool * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:244
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:295
static RHIDeviceDescriptorPool * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:292
static RHIDeviceDescriptorSetLayout * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:284
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:287
static RHIDeviceFence * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:260
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:263
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:303
static RHIDeviceSampler * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:300
static RHIDeviceSemaphore * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:252
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:255
static RHIPipelineState * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:228
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:231
static RHIShaderModule * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:236
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:239
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:223
static RHISwapchain * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:220
static RHITexture * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:276
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:279
Provides type traits for types derived from RHIObject.
Definition Details.hpp:30
Definition PipelineState.hpp:11
Definition Swapchain.hpp:23
Definition Resource.hpp:79