Foundation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Foundation::RenderCore::BindlessPool Class Reference

#include <Bindless.hpp>

Classes

struct  Binding
 
struct  BindlessPoolDesc
 

Public Member Functions

 BindlessPool (RHIDevice *device, Allocator *allocator, BindlessPoolDesc const &desc)
 
uint32_t Allocate (RHITextureView *view)
 
uint32_t Allocate (RHIDeviceScopedHandle< RHITexture > &&texture, RHITextureView *view)
 Takes ownership of the texture, and creates a binding for it.
 
void Free (uint32_t id)
 Free a binding, and - with it - the owned resource (if any).
 
ResourceGetResource (uint32_t id)
 
ViewGetView (uint32_t id)
 
RHIDeviceDescriptorSetLayoutGetDescriptorSetLayout () const
 
RHIDeviceDescriptorSetGetDescriptorSet () const
 

Public Attributes

const BindlessPoolDesc mDesc
 

Private Types

using Resource = Variant< RHITexture *, RHIDeviceScopedHandle< RHITexture > >
 
using View = Variant< RHITextureView *, RHITextureScopedHandle< RHITextureView > >
 

Private Member Functions

uint32_t Update (uint32_t id, RHITextureView *view)
 

Private Attributes

RHIDevice *const mDevice
 
Allocator *const mAllocator
 
AtomicPool< BindingmBindings
 
RHIDeviceScopedHandle< RHIDeviceDescriptorSetLayoutmDescLayout
 
RHIDeviceScopedHandle< RHIDeviceDescriptorPoolmDescPool
 
RHIDeviceDescriptorPoolScopedHandle< RHIDeviceDescriptorSetmDescSet
 
Mutex mDescMutex
 
RHIDeviceIdleGuard mIdleGuard
 

Member Typedef Documentation

◆ Resource

◆ View

Constructor & Destructor Documentation

◆ BindlessPool()

Foundation::RenderCore::BindlessPool::BindlessPool ( RHIDevice device,
Allocator allocator,
BindlessPoolDesc const desc 
)

Member Function Documentation

◆ Allocate() [1/2]

uint32_t Foundation::RenderCore::BindlessPool::Allocate ( RHIDeviceScopedHandle< RHITexture > &&  texture,
RHITextureView view 
)

Takes ownership of the texture, and creates a binding for it.

◆ Allocate() [2/2]

uint32_t Foundation::RenderCore::BindlessPool::Allocate ( RHITextureView view)

@breif Create a binding for the given texture view, with ownership remaining with the caller.

◆ Free()

void Foundation::RenderCore::BindlessPool::Free ( uint32_t  id)

Free a binding, and - with it - the owned resource (if any).

◆ GetDescriptorSet()

RHIDeviceDescriptorSet * Foundation::RenderCore::BindlessPool::GetDescriptorSet ( ) const
inline

◆ GetDescriptorSetLayout()

RHIDeviceDescriptorSetLayout * Foundation::RenderCore::BindlessPool::GetDescriptorSetLayout ( ) const
inline

◆ GetResource()

Resource & Foundation::RenderCore::BindlessPool::GetResource ( uint32_t  id)
inline

◆ GetView()

View & Foundation::RenderCore::BindlessPool::GetView ( uint32_t  id)
inline

◆ Update()

uint32_t Foundation::RenderCore::BindlessPool::Update ( uint32_t  id,
RHITextureView view 
)
private

Member Data Documentation

◆ mAllocator

Allocator* const Foundation::RenderCore::BindlessPool::mAllocator
private

◆ mBindings

AtomicPool<Binding> Foundation::RenderCore::BindlessPool::mBindings
private

◆ mDesc

const BindlessPoolDesc Foundation::RenderCore::BindlessPool::mDesc

◆ mDescLayout

RHIDeviceScopedHandle<RHIDeviceDescriptorSetLayout> Foundation::RenderCore::BindlessPool::mDescLayout
private

◆ mDescMutex

Mutex Foundation::RenderCore::BindlessPool::mDescMutex
private

◆ mDescPool

RHIDeviceScopedHandle<RHIDeviceDescriptorPool> Foundation::RenderCore::BindlessPool::mDescPool
private

◆ mDescSet

RHIDeviceDescriptorPoolScopedHandle<RHIDeviceDescriptorSet> Foundation::RenderCore::BindlessPool::mDescSet
private

◆ mDevice

RHIDevice* const Foundation::RenderCore::BindlessPool::mDevice
private

◆ mIdleGuard

RHIDeviceIdleGuard Foundation::RenderCore::BindlessPool::mIdleGuard
private

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