Kanzi 4.1.0
Reflection
Collaboration diagram for Reflection:

Classes

struct  kanzi::gfx::reflection::AccelerationStructure
 Acceleration structure reflection information. More...
 
struct  kanzi::gfx::reflection::Attribute
 Reflection entry for a stage input or output attribute. More...
 
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

bool kanzi::gfx::reflection::isReservedGPUSceneDescriptorSetIndex (uint32_t index)
 Checks if given descriptor set is reserved by reserved gpu scene.
 
bool kanzi::gfx::reflection::isReservedGPUSceneUniform (uint32_t setIndex, uint32_t bindingIndex)
 Checks if given descriptor set and binding index is reserved by reserved gpu scene uniform.
 
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.
 

Variables

static string kanzi::gfx::reflection::GPUSceneMaterialInfoName
 Specifies the reserved gpu scene material info uniform name.
 
static string kanzi::gfx::reflection::GPUSceneName
 Specifies the reserved gpu scene uniform name.
 
static string kanzi::gfx::reflection::GPUSceneTexturesNamePrefix
 Specifies the reserved gpu scene textures name prefix.
 
static uint32_t kanzi::gfx::reflection::ReservedGPUSceneBindlessTextures2DBindingIndex
 Specifies the reserved gpu scene bindless textures binding index.
 
static uint32_t kanzi::gfx::reflection::ReservedGPUSceneDescriptorSetIndex
 Specifies the reserved gpu scene descriptor set index.
 
static uint32_t kanzi::gfx::reflection::ReservedGPUSceneUniformBindingIndex
 Specifies the reserved gpu scene uniform binding index.
 

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

◆ isReservedGPUSceneDescriptorSetIndex()

bool kanzi::gfx::reflection::isReservedGPUSceneDescriptorSetIndex ( uint32_t index)
inline

Checks if given descriptor set is reserved by reserved gpu scene.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ isReservedGPUSceneUniform()

bool kanzi::gfx::reflection::isReservedGPUSceneUniform ( uint32_t setIndex,
uint32_t bindingIndex )
inline

Checks if given descriptor set and binding index is reserved by reserved gpu scene uniform.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ 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

Variable Documentation

◆ ReservedGPUSceneDescriptorSetIndex

uint32_t kanzi::gfx::reflection::ReservedGPUSceneDescriptorSetIndex
static

Specifies the reserved gpu scene descriptor set index.

Should be in sync with Studio KANZI_SHADER_GPU_SCENE_DESCRIPTOR_SET.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ ReservedGPUSceneUniformBindingIndex

uint32_t kanzi::gfx::reflection::ReservedGPUSceneUniformBindingIndex
static

Specifies the reserved gpu scene uniform binding index.

Should be in sync with Studio KANZI_SHADER_GPU_SCENE_UNIFORM_BINDING.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ ReservedGPUSceneBindlessTextures2DBindingIndex

uint32_t kanzi::gfx::reflection::ReservedGPUSceneBindlessTextures2DBindingIndex
static

Specifies the reserved gpu scene bindless textures binding index.

Should be in sync with Studio KANZI_SHADER_GPU_SCENE_BINDLESS_TEXTURES_2D_BINDING.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ GPUSceneMaterialInfoName

string kanzi::gfx::reflection::GPUSceneMaterialInfoName
static

Specifies the reserved gpu scene material info uniform name.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ GPUSceneName

string kanzi::gfx::reflection::GPUSceneName
static

Specifies the reserved gpu scene uniform name.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.

◆ GPUSceneTexturesNamePrefix

string kanzi::gfx::reflection::GPUSceneTexturesNamePrefix
static

Specifies the reserved gpu scene textures name prefix.

Since
Kanzi 4.1.0
Attention
This feature is experimental and is likely to change in future releases.