Lysa  0.0
Lysa 3D Engine
GlobalDescriptorSet Class Reference

Detailed Description

Global GPU resources

Public Member Functions

 GlobalDescriptorSet ()
 
 ~GlobalDescriptorSet ()
 
std::shared_ptr< vireo::DescriptorSet > getDescriptorSet (uint32 index) const
 
std::shared_ptr< vireo::DescriptorLayout > getDescriptorLayout (uint32 index) const
 
void update ()
 
std::shared_ptr< const GlobalResourcesGeneration > capture ()
 
std::vector< std::weak_ptr< const void > > retirementGuards () const
 
void trackFrame (const std::shared_ptr< vireo::Fence > &fence, const std::vector< std::shared_ptr< vireo::CommandList >> &commands)
 
void collect ()
 
void releaseFrame (const std::shared_ptr< vireo::Fence > &fence)
 

Static Public Attributes

static constexpr vireo::DescriptorIndex BINDING_MATERIALS {0}
 
static constexpr vireo::DescriptorIndex BINDING_SURFACES {1}
 
static constexpr vireo::DescriptorIndex BINDING_MESHES {2}
 
static constexpr vireo::DescriptorIndex BINDING_IMAGES {3}
 
static constexpr vireo::DescriptorIndex BINDING_SHADER_MATERIAL_PARAMETERS {0}
 

Constructor & Destructor Documentation

GlobalDescriptorSet ( )
~GlobalDescriptorSet ( )

Member Function Documentation

std::shared_ptr<const GlobalResourcesGeneration> capture ( )

Capture a snapshot

void collect ( )

Clean completed command lists (including frames of suspended targets).

std::shared_ptr<vireo::DescriptorLayout> getDescriptorLayout ( uint32  index) const
std::shared_ptr<vireo::DescriptorSet> getDescriptorSet ( uint32  index) const
void releaseFrame ( const std::shared_ptr< vireo::Fence > &  fence)

Called after acquire() waits for a slot before its fence/allocator is reused.

std::vector<std::weak_ptr<const void> > retirementGuards ( ) const

GPU users that must finish before an allocation or resource ID can be reused.

void trackFrame ( const std::shared_ptr< vireo::Fence > &  fence,
const std::vector< std::shared_ptr< vireo::CommandList >> &  commands 
)

Track the final fence and all command lists of one target frame.

void update ( )

Publish a new immutable generation when buffer handles or image slots change.

Member Data Documentation

constexpr vireo::DescriptorIndex BINDING_IMAGES {3}
staticconstexpr
constexpr vireo::DescriptorIndex BINDING_MATERIALS {0}
staticconstexpr
constexpr vireo::DescriptorIndex BINDING_MESHES {2}
staticconstexpr
constexpr vireo::DescriptorIndex BINDING_SHADER_MATERIAL_PARAMETERS {0}
staticconstexpr
constexpr vireo::DescriptorIndex BINDING_SURFACES {1}
staticconstexpr