13 class RHIDeviceSemaphore;
342 void*
dest)
const = 0;
General Purpose Allocator (GPA) interface.
Definition Allocator.hpp:24
Definition Resource.hpp:332
The root object of everything RHI. Implementation of this class inherently defines the RHI backend.
Definition Application.hpp:11
Definition Resource.hpp:57
Definition Command.hpp:18
Definition Descriptor.hpp:49
const RHIDeviceDescriptorSetLayoutDesc mDesc
Definition Device.hpp:95
RHIDeviceDescriptorSetLayout(RHIDevice const &device, RHIDeviceDescriptorSetLayoutDesc const &desc)
Definition Device.hpp:96
const RHIDevice & mDevice
Definition Device.hpp:92
virtual void DebugSetObjectName(const char *name)=0
const RHIDevice & mDevice
Definition Device.hpp:68
RHIDeviceFence(RHIDevice const &device)
Definition Device.hpp:71
virtual void DebugSetObjectName(const char *name)=0
Definition Device.hpp:164
virtual Span< const uint64_t > GetResults(bool wait=true)=0
struct Foundation::RHI::RHIDeviceQueryPool::QueryPoolDesc mDesc
virtual const float GetTimestampResolution()=0
const RHIDevice & mDevice
Definition Device.hpp:166
virtual void DebugSetObjectName(const char *name)=0
RHIDeviceQueryPool(RHIDevice const &device, QueryPoolDesc const &desc)
Definition Device.hpp:178
RHIDeviceQueue(RHIDevice const &device)
Definition Device.hpp:21
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:24
virtual uint32_t GetVkQueueFamily() const =0
virtual void WaitIdle() const =0
virtual void Present(PresentDesc const &desc) const =0
const RHIDevice & mDevice
Definition Device.hpp:18
Definition Device.hpp:104
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc mDesc
const RHIDevice & mDevice
Definition Device.hpp:106
RHIDeviceSampler(RHIDevice const &device, SamplerDesc const &desc)
Definition Device.hpp:159
virtual void DebugSetObjectName(const char *name)=0
RHIDeviceSemaphore(RHIDevice const &device, bool is_timeline)
Definition Device.hpp:61
const RHIDevice & mDevice
Definition Device.hpp:57
const bool mIsTimeline
Definition Device.hpp:60
virtual void DebugSetObjectName(const char *name)=0
Definition Device.hpp:245
virtual RHIBuffer * GetBuffer(Handle handle) const =0
virtual RHIDeviceScopedHandle< RHIPipelineState > CreatePipelineState(RHIPipelineState::PipelineStateDesc const &desc)=0
virtual void DestroyAccelerationStructure(Handle handle)=0
virtual RHIDeviceScopedHandle< RHIBuffer > CreateBuffer(RHIBufferDesc const &desc)=0
virtual RHIDeviceDescriptorPool * GetDescriptorPool(Handle handle) const =0
virtual void DestroyQueryPool(Handle handle)=0
virtual RHIDeviceSampler * GetSampler(Handle handle) const =0
virtual RHIPipelineState * GetPipelineState(Handle handle) const =0
virtual bool WaitForTimelineSemaphores(Span< const Pair< RHIDeviceSemaphore *, size_t > > semaphores, size_t timeout)=0
Wait for timeline semaphores to reach specified values.
virtual String QueryDeviceString() const =0
virtual void DestroyVirtualAllocator(Handle handle)=0
virtual RHIDeviceScopedHandle< RHICommandPool > CreateCommandPool(RHICommandPool::PoolDesc type)=0
virtual Span< RHISwapchainPresentMode const > GetSwapchainSupportedPresentModes() const =0
virtual bool WaitForFences(Span< RHIDeviceFence *const > fences, bool wait_all, size_t timeout)=0
Wait for fences to arrive.
virtual RHIAccelerationStructureSizeInfo GetAccelerationStructureSizeInfo(RHIAccelerationStructureBuildDesc const &desc, Allocator *scratchAllocator=nullptr) const =0
virtual RHIDeviceFence * GetFence(Handle handle) const =0
virtual RHISwapchain * GetSwapchain(Handle handle) const =0
virtual RHIDeviceScopedHandle< RHIShaderModule > CreateShaderModule(RHIShaderModule::ShaderModuleDesc const &desc)=0
virtual void DestroyDescriptorPool(Handle handle)=0
virtual RHIPipelineStateCache * GetPipelineCache(Handle handle) const =0
virtual void DestroyPipelineState(Handle handle)=0
virtual RHIPipelineStateCacheKey GetPipelineCacheKey() const =0
const RHIApplication & mApp
Definition Device.hpp:247
virtual RHITexture * GetTexture(Handle handle) const =0
virtual RHIDeviceScopedHandle< RHIDeviceDescriptorSetLayout > CreateDescriptorSetLayout(RHIDeviceDescriptorSetLayoutDesc const &desc)=0
virtual Span< RHISurfaceFormat const > GetSwapchainSupportedFormats() const =0
virtual void DestroyShaderModule(Handle handle)=0
virtual void DestroyTexture(Handle handle)=0
virtual RHIDeviceScopedHandle< RHIAccelerationStructure > CreateAccelerationStructure(RHIAccelerationStructureDesc const &desc)=0
virtual RHIAccelerationStructure * GetAccelerationStructure(Handle handle) const =0
virtual RHIDeviceScopedHandle< RHITexture > CreateTexture(RHITextureDesc const &desc)=0
virtual RHIDeviceScopedHandle< RHIVirtualAllocator > CreateVirtualAllocator(uint64_t size)=0
virtual void DestroySemaphore(Handle handle)=0
virtual void DebugSetObjectName(const char *name)=0
virtual void ResetFences(Span< RHIDeviceFence *const > fences)=0
virtual void DestroyPipelineCache(Handle handle)=0
virtual void DestroySampler(Handle handle)=0
virtual void WaitIdle() const =0
virtual RHIDeviceScopedHandle< RHIDeviceSampler > CreateSampler(RHIDeviceSampler::SamplerDesc const &desc)=0
virtual size_t WriteAccelerationStructureInstanceData(RHIAccelerationStructureGeometryInstance const &data, void *dest) const =0
virtual RHIDeviceScopedHandle< RHIPipelineStateCache > CreatePipelineCache(RHIPipelineStateCache::PipelineStateCacheDesc const &desc)=0
virtual RHIDeviceScopedHandle< RHIDeviceDescriptorPool > CreateDescriptorPool(RHIDeviceDescriptorPool::PoolDesc const &desc)=0
virtual void QueryMemoryStats(RHIDeviceMemoryStats &outStats) const =0
virtual void QueryAllocationStats(size_t &blockBytes, size_t &allocationBytes) const =0
virtual RHIDeviceQueryPool * GetQueryPool(Handle handle) const =0
virtual RHIDeviceSemaphore * GetSemaphore(Handle handle) const =0
virtual RHIDeviceCapabilities GetCapabilities() const =0
virtual RHIVirtualAllocator * GetVirtualAllocator(Handle handle) const =0
virtual RHIDeviceScopedHandle< RHIDeviceFence > CreateFence(bool signaled=true)=0
virtual RHIShaderModule * GetShaderModule(Handle handle) const =0
virtual void QueryBudget(size_t &used, size_t &budget) const =0
virtual RHIDeviceScopedHandle< RHIDeviceQueryPool > CreateQueryPool(RHIDeviceQueryPool::QueryPoolDesc const &desc)=0
virtual void SignalTimelineSemaphores(Span< const Pair< RHIDeviceSemaphore *, size_t > > semaphores)=0
virtual void DestroyBuffer(Handle handle)=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 RHIDeviceScopedHandle< RHISwapchain > CreateSwapchain(RHISwapchain::SwapchainDesc const &desc)=0
virtual RHIDeviceScopedHandle< RHIDeviceSemaphore > CreateSemaphore(bool is_timeline=false)=0
virtual void DestroyCommandPool(Handle handle)=0
RHIDevice(RHIApplication const &app)
Definition Device.hpp:255
Base class for all RHI objects.
Definition Details.hpp:16
Definition PipelineState.hpp:28
Definition PipelineState.hpp:45
Scoped move-only RAII handle wrapper for RHI Objects.
Definition Details.hpp:86
Definition Swapchain.hpp:19
Definition Resource.hpp:216
Sub-allocates byte ranges within an abstract fixed-size space.
Definition Resource.hpp:124
std::vector< T, StlAllocator< T > > Vector
std::vector with explicit Foundation::Core::StlAllocator constructor
Definition Container.hpp:130
std::basic_string< char > String
Alias for std::basic_string<char>, without an explicit allocator constructor.
Definition Container.hpp:112
std::pair< First, Second > Pair
Alias for std::pair
Definition Container.hpp:32
T * Construct(Allocator *resource, Args &&...args)
Convenience placement new with object of type T using a Foundation::Core::Allocator.
Definition Allocator.hpp:153
std::span< T > Span
Alias for std::span
Definition Container.hpp:60
Low-level Rendering Hardware Interface (RHI) abstractions.
Definition Application.hpp:4
uintptr_t Handle
Definition Details.hpp:8
RHIDeviceQueueType
Definition Common.hpp:164
RHIDescriptorType
Definition Common.hpp:239
Definition Resource.hpp:320
Definition Resource.hpp:256
Definition Resource.hpp:289
Definition Resource.hpp:250
Definition Resource.hpp:28
Definition Command.hpp:24
Definition Device.hpp:189
bool meshShaders
Definition Device.hpp:193
size_t maxStorageBufferRange
Definition Device.hpp:202
bool dedicatedCompute
Definition Device.hpp:190
bool deviceLocalHostVisibleBuffers
Definition Device.hpp:198
bool timestampQueries
Definition Device.hpp:196
bool raytracingInline
Definition Device.hpp:194
bool dedicatedTransfer
Definition Device.hpp:191
bool raytracingPipeline
Definition Device.hpp:195
bool shaderExecutionReordering
Definition Device.hpp:192
size_t deviceLocalHostVisibleHeapSize
Definition Device.hpp:201
bool integratedGPU
Definition Device.hpp:197
Definition Descriptor.hpp:53
RHIDescriptorType type
Definition Device.hpp:81
uint32_t count
Definition Device.hpp:79
RHIShaderStage stage
Definition Device.hpp:80
Span< const Binding > bindings
Definition Device.hpp:84
bool updateAfterBind
Definition Device.hpp:87
RAII guard to wait for device idle on destruction.
Definition Device.hpp:375
~RHIDeviceIdleGuard()
Definition Device.hpp:384
void WaitIdle() const
Definition Device.hpp:379
RHIDeviceIdleGuard(RHIDevice const *device)
Definition Device.hpp:378
RHIDeviceIdleGuard()=delete
RHIDevice const * mDevice
Definition Device.hpp:376
Definition Device.hpp:205
size_t heapSize
Definition Device.hpp:208
uint32_t heapIndex
Definition Device.hpp:206
bool deviceLocal
Definition Device.hpp:207
size_t blockBytes
Definition Device.hpp:213
size_t usage
Definition Device.hpp:209
uint32_t blockCount
Definition Device.hpp:211
size_t allocationBytes
Definition Device.hpp:214
uint32_t allocationCount
Definition Device.hpp:212
size_t budget
Definition Device.hpp:210
Definition Device.hpp:237
Vector< RHIDeviceMemoryTypeStat > memoryTypes
Definition Device.hpp:239
Vector< RHIDeviceMemoryHeapStat > heaps
Definition Device.hpp:238
RHIDeviceMemoryStats(Allocator *allocator)
Definition Device.hpp:242
RHIDeviceMemoryTypeStat total
Definition Device.hpp:240
Definition Device.hpp:217
uint32_t unusedRangeCount
Definition Device.hpp:228
size_t unusedRangeSizeMax
Definition Device.hpp:234
uint32_t allocationCount
Definition Device.hpp:227
bool protectedMemory
Definition Device.hpp:225
bool hostCached
Definition Device.hpp:223
bool hostCoherent
Definition Device.hpp:222
size_t blockBytes
Definition Device.hpp:229
size_t unusedRangeSizeMin
Definition Device.hpp:233
size_t allocationSizeMin
Definition Device.hpp:231
uint32_t blockCount
Definition Device.hpp:226
bool hostVisible
Definition Device.hpp:221
size_t allocationSizeMax
Definition Device.hpp:232
bool deviceLocal
Definition Device.hpp:220
bool lazilyAllocated
Definition Device.hpp:224
uint32_t heapIndex
Definition Device.hpp:219
uint32_t typeIndex
Definition Device.hpp:218
size_t allocationBytes
Definition Device.hpp:230
Definition Device.hpp:170
uint32_t count
Definition Device.hpp:176
QueryType
Definition Device.hpp:172
@ AccelerationStructureCompactedSize
Definition Device.hpp:174
@ Timestamp
Definition Device.hpp:173
enum Foundation::RHI::RHIDeviceQueryPool::QueryPoolDesc::QueryType type
RHISwapchain * swapchain
Definition Device.hpp:45
Span< RHIDeviceSemaphore *const > waits
Definition Device.hpp:47
uint32_t imageIndex
Definition Device.hpp:44
Span< RHICommandList *const > cmdLists
Definition Device.hpp:38
Span< RHIDeviceSemaphore *const > signals
Definition Device.hpp:36
Span< const TimelinePair > timelineSignals
Definition Device.hpp:30
Span< RHIDeviceSemaphore *const > waits
Definition Device.hpp:32
Span< const TimelinePair > timelineWaits
Definition Device.hpp:28
Span< const RHIPipelineStage > waitsStages
Definition Device.hpp:34
Definition Device.hpp:117
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::AddressMode::Mode Repeat
Mode
Definition Device.hpp:119
@ ClampToBorder
Definition Device.hpp:123
@ ClampToEdge
Definition Device.hpp:122
@ MirroredRepeat
Definition Device.hpp:121
@ Repeat
Definition Device.hpp:120
@ MirrorClampToEdge
Definition Device.hpp:124
Definition Device.hpp:112
bool enable
Definition Device.hpp:113
float maxLevel
Definition Device.hpp:114
Definition Device.hpp:138
Type
Definition Device.hpp:140
@ Linear
Definition Device.hpp:142
@ NearestNeighbor
Definition Device.hpp:141
@ Cubic
Definition Device.hpp:143
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::Filter::Type Linear
Definition Device.hpp:148
float max
Definition Device.hpp:150
float min
Definition Device.hpp:149
Definition Device.hpp:129
float bias
Definition Device.hpp:135
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::Mipmap::MipmapMode Linear
MipmapMode
Definition Device.hpp:131
@ Nearest
Definition Device.hpp:133
@ Linear
Definition Device.hpp:132
Definition Device.hpp:110
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::LOD lod
Reduction
Definition Device.hpp:153
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::Mipmap mipmap
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::Anisotropy anisotropy
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::AddressMode addressMode
enum Foundation::RHI::RHIDeviceSampler::SamplerDesc::Reduction WeightedAverage
struct Foundation::RHI::RHIDeviceSampler::SamplerDesc::Filter filter
Definition Device.hpp:251
String name
Definition Device.hpp:253
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:490
static RHIAccelerationStructure * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:486
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:430
static RHIBuffer * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:429
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:412
static RHICommandPool * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:411
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:454
static RHIDeviceDescriptorPool * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:450
static RHIDeviceDescriptorSetLayout * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:441
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:445
static RHIDeviceFence * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:423
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:424
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:481
static RHIDeviceQueryPool * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:480
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:460
static RHIDeviceSampler * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:459
static RHIDeviceSemaphore * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:417
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:418
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:469
static RHIPipelineStateCache * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:465
static RHIPipelineState * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:396
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:400
static RHIShaderModule * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:405
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:406
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:391
static RHISwapchain * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:390
static RHITexture * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:435
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:436
static RHIVirtualAllocator * Get(RHIDevice const *device, Handle handle)
Definition Device.hpp:474
static void Destroy(RHIDevice *device, Handle handle)
Definition Device.hpp:475
Provides type traits for types derived from RHIObject.
Definition Details.hpp:30
Definition PipelineState.hpp:13
Definition PipelineState.hpp:35
Definition PipelineState.hpp:49
Definition Swapchain.hpp:23
Definition Resource.hpp:142