Kanzi 4.0.0-beta2
Reflection
Collaboration diagram for Reflection:

Classes

struct  kanzi::gfx::reflection::BindingBlock
 Describes a binding block which corresponds to a resource set. More...
 
struct  kanzi::gfx::reflection::Buffer
 Buffer reflection information. More...
 
struct  kanzi::gfx::reflection::Image
 Image reflection information. More...
 
struct  kanzi::gfx::reflection::InterfaceBlock
 Describes an interface block that can be a uniform buffer object or push constant object. More...
 
struct  kanzi::gfx::reflection::Member
 Describes a uniform member. More...
 
struct  kanzi::gfx::reflection::ReflectionInfo
 Top-level structure that contains the reflection information for a shader stage or program. More...
 
struct  kanzi::gfx::reflection::Sampler
 Sampler reflection information. More...
 
struct  kanzi::gfx::reflection::TypeInfo
 Contains a description of a shader value. More...
 
class  kanzi::gfx::reflection::UniformBlockBuilder
 A helper class to build uniform blocks based on reflection information. More...
 

Enumerations

enum class  kanzi::gfx::reflection::AccessStage : uint8_t { kanzi::gfx::reflection::AccessStage::VertexStage , kanzi::gfx::reflection::AccessStage::FragmentStage , kanzi::gfx::reflection::AccessStage::ComputeStage , kanzi::gfx::reflection::AccessStage::All }
 Specifies the stages that use the resource. More...
 
enum class  kanzi::gfx::reflection::PrimitiveType : uint8_t {
  kanzi::gfx::reflection::PrimitiveType::Invalid , kanzi::gfx::reflection::PrimitiveType::Boolean , kanzi::gfx::reflection::PrimitiveType::Integer , kanzi::gfx::reflection::PrimitiveType::UnsignedInteger ,
  kanzi::gfx::reflection::PrimitiveType::FloatingPoint
}
 Specifies the primitive types. More...
 

Functions

ReflectionInfo kanzi::gfx::reflection::mergeReflectionInfos (span< ReflectionInfo > infos)
 Merges reflection information into a unified structure.
 
constexpr bool kanzi::gfx::reflection::operator!= (const TypeInfo &lhs, const TypeInfo &rhs)
 Not equality operator for the TypeInfo.
 
constexpr bool kanzi::gfx::reflection::operator== (const TypeInfo &lhs, const TypeInfo &rhs)
 Equality operator for the TypeInfo.
 
gfx::Format kanzi::gfx::reflection::to_format (const TypeInfo &info)
 Converts a TypeInfo structure into a graphics format.
 

Detailed Description

Shader reflection library.

Enumeration Type Documentation

◆ AccessStage

Specifies the stages that use the resource.

Since
Kanzi 4.0.0
Enumerator
VertexStage 

Resource is accessed by vertex stage(s).

FragmentStage 

Resource is accessed by fragment stage.

ComputeStage 

Resource is accessed by compute stage.

All 

Access by all stages.

◆ PrimitiveType

Specifies the primitive types.

Since
Kanzi 4.0.0
Enumerator
Invalid 

An invalid primitive type.

Boolean 

A boolean primitive type.

Integer 

An integral primitive type.

UnsignedInteger 

An unsigned integral primitive type.

FloatingPoint 

A floating point primitive type.

Function Documentation

◆ to_format()

gfx::Format kanzi::gfx::reflection::to_format ( const TypeInfo & info)
inline

Converts a TypeInfo structure into a graphics format.

Parameters
infoThe source TypeInfo.
Returns
The graphics format that represents the type info.
Since
Kanzi 4.0.0

◆ operator==()

constexpr bool kanzi::gfx::reflection::operator== ( const TypeInfo & lhs,
const TypeInfo & rhs )
constexpr

Equality operator for the TypeInfo.

Parameters
lhsThe first TypeInfo value.
rhsThe second TypeInfo value.
Returns
If the values are equivalent, true, otherwise false.
Since
Kanzi 4.0.0

◆ operator!=()

constexpr bool kanzi::gfx::reflection::operator!= ( const TypeInfo & lhs,
const TypeInfo & rhs )
constexpr

Not equality operator for the TypeInfo.

Parameters
lhsThe first TypeInfo value.
rhsThe second TypeInfo value.
Returns
If the values are not equivalent, true, otherwise false.
Since
Kanzi 4.0.0

◆ mergeReflectionInfos()

ReflectionInfo kanzi::gfx::reflection::mergeReflectionInfos ( span< ReflectionInfo > infos)
inline

Merges reflection information into a unified structure.

This is commonly used to combine individual reflection information for multiple shader stages into reflection for the whole program.

Parameters
infosA span of reflection information in stage order.
Returns
The combined reflection information.
Since
Kanzi 4.0.0