21 namespace Reflection {
255 float minLOD = -std::numeric_limits<float>::max();
256 float maxLOD = std::numeric_limits<float>::max();
ResourceType
Resource type enumeration.
Definition Reflection.hpp:116
@ RWStructuredBuffer
Structured read-write buffer: RWStructuredBuffer in HLSL, buffer in GLSL and VKSL.
@ TextureCube
Cube texture: TextureCube in HLSL, textureCube in GLSL (Vulkan only).
@ RWTexture2DMS
2D multi-sampled read-write texture: RWTexture2DMS in HLSL, image2DMS in GLSL.
@ Sampler2DMSArray
Combined 2D multi-sampled array texture-sampler: sampler2DMSArray in GLSL.
@ RWTexture2DArray
2D array read-write texture: RWTexture2DArray in HLSL, image2DArray in GLSL.
@ Sampler2DRect
Combined 2D texture-sampler with unnormalized texture coordinates: sampler2DRect in GLSL.
@ Sampler1DArray
Combined 1D array texture-sampler: sampler1DArray in GLSL.
@ SamplerCubeArray
Combined Cube array texture-sampler: samplerCubeArray in GLSL.
@ RWTexture1DArray
1D array read-write texture: RWTexture1DArray in HLSL, image1DArray in GLSL.
@ Sampler2DArray
Combined 2D array texture-sampler: sampler2DArray in GLSL.
@ AppendStructuredBuffer
Append structured buffer: AppendStructuredBuffer in HLSL, buffer in GLSL.
@ Texture2DArray
2D array texture: Texture2DArray in HLSL, texture2DArray in GLSL (Vulkan only).
@ RWTexture1D
1D read-write texture: RWTexture1D in HLSL, image1D in GLSL.
@ SamplerCube
Combined Cube texture-sampler: samplerCube in GLSL.
@ ByteAddressBuffer
Byte addressable buffer: ByteAddressBuffer in HLSL, samplerBuffer in GLSL.
@ Sampler1D
Combined 1D texture-sampler: sampler1D in GLSL.
@ SamplerComparisonState
Sampler comparison state: SamplerComparisonState in HLSL, sampler in GLSL (Vulkan only).
@ Sampler2D
Combined 2D texture-sampler: sampler2D in GLSL.
@ RWTexture2DMSArray
2D multi-sampled array read-write texture: RWTexture2DMSArray in HLSL, image2DMSArray in GLSL.
@ Texture2DMS
2D multi-sampled texture: Texture2DMS in HLSL, texture2DMS in GLSL (Vulkan only).
@ RWByteAddressBuffer
Byte addressable read-write buffer: RWByteAddressBuffer in HLSL, imageBuffer in GLSL.
@ Buffer
Vector buffer: Buffer in HLSL, samplerBuffer in GLSL.
@ Texture3D
3D texture: Texture3D in HLSL, texture3D in GLSL (Vulkan only).
@ RWTexture3D
3D read-write texture: RWTexture3D in HLSL, image3D in GLSL.
@ Texture1DArray
1D array texture: Texture1DArray in HLSL, texture1DArray in GLSL (Vulkan only).
@ ConsumeStructuredBuffer
Consume structured buffer: ConsumeStructuredBuffer in HLSL, buffer in GLSL.
@ RWBuffer
Vector read-write buffer: RWBuffer in HLSL, imageBuffer in GLSL.
@ RWTexture2D
2D read-write texture: RWTexture2D in HLSL, image2D in GLSL.
@ Texture2D
2D texture: Texture2D in HLSL, texture2D in GLSL (Vulkan only).
@ TextureCubeArray
Cube array texture: TextureCubeArray in HLSL, textureCubeArray in GLSL (Vulkan only).
@ StructuredBuffer
Structured buffer: StructuredBuffer in HLSL, buffer in GLSL and VKSL.
@ RWTextureCubeArray
Cube array read-write texture: RWTextureCubeArray in HLSL, imageCubeArray in GLSL.
@ Sampler2DMS
Combined 2D multi-sampled texture-sampler: sampler2DMS in GLSL.
@ Texture2DMSArray
2D multi-sampled array texture: Texture2DMSArray in HLSL, texture2DMSArray in GLSL (Vulkan only).
@ RWTextureCube
Cube read-write texture: RWTextureCube in HLSL, imageCube in GLSL.
@ Sampler3D
Combined 3D texture-sampler: sampler3D in GLSL.
@ Texture1D
1D texture: Texture1D in HLSL, texture1D in GLSL (Vulkan only).
@ TextureBuffer
Texture buffer: tbuffer in HLSL, samplerBuffer in GLSL.
@ Undefined
Undfined resource type.
TextureAddressMode
Texture address mode enumeration (compatible to D3D11_TEXTURE_ADDRESS_MODE).
Definition Reflection.hpp:65
ComparisonFunc
Sample comparison function enumeration (compatible to D3D11_COMPARISON_FUNC).
Definition Reflection.hpp:75
Filter
Sampler filter enumeration (compatible to D3D11_FILTER).
Definition Reflection.hpp:24
@ MinimumMinMagPointMipLinear
@ MinimumMinPointMagLinearMipPoint
@ MaximumMinPointMagLinearMipPoint
@ MinLinearMagPointMipLinear
@ ComparisonMinPointMagMipLinear
@ MaximumMinLinearMagMipPoint
@ ComparisonMinMagMipPoint
@ ComparisonMinMagLinearMipPoint
@ ComparisonMinMagMipLinear
@ ComparisonMinLinearMagPointMipLinear
@ ComparisonMinLinearMagMipPoint
@ ComparisonMinMagPointMipLinear
@ MinimumMinLinearMagPointMipLinear
@ MaximumMinPointMagMipLinear
@ MaximumMinMagLinearMipPoint
@ MaximumMinLinearMagPointMipLinear
@ MinimumMinMagLinearMipPoint
@ MinimumMinPointMagMipLinear
@ MaximumMinMagPointMipLinear
@ ComparisonMinPointMagLinearMipPoint
@ MinPointMagLinearMipPoint
@ MinimumMinLinearMagMipPoint
FieldType
Data field type enumeration.
Definition Reflection.hpp:88
@ Int
Signed integer type.
@ Float
Single-precision floating-point type.
@ Half
Half-precision floating-point type.
@ Double
Double-precision floating-point type.
@ Undefined
Undefined field type.
String toString(const CiString &s)
Definition CiString.hpp:20
void printReflection(std::ostream &stream, const Reflection::ReflectionData &reflectionData, bool referencedOnly=false)
Prints the reflection data into the output stream in a human readable format.
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
std::int32_t Int32
Definition DataTypes.hpp:21
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Input/output attribute and uniform reflection structure.
Definition Reflection.hpp:262
Int32 slot
Zero-based attribute slot number. If this is -1, the binding slot was not specified....
Definition Reflection.hpp:270
bool referenced
Specifies whether this attribute is referenced in the output shader unit. By default false.
Definition Reflection.hpp:264
Attribute(const String &name, const Int32 slot)
Constructor to initialize all members.
Definition Reflection.hpp:276
Attribute()=default
Default constructor.
String name
Name of the attribute.
Definition Reflection.hpp:267
Constant buffer reflection structure.
Definition Reflection.hpp:352
bool referenced
Specifies whether this constant buffer is referenced in the output shader unit. By default false.
Definition Reflection.hpp:354
String name
Name of the constant buffer.
Definition Reflection.hpp:360
Vector< Field > fields
Collection of all fields within this constant buffer.
Definition Reflection.hpp:366
UInt32 size
Size (in bytes) of the constant buffer with a 16-byte alignment. If this is 0xFFFFFFFF,...
Definition Reflection.hpp:369
UInt32 padding
Size (in bytes) of the padding that is added to the constant buffer. By default 0.
Definition Reflection.hpp:372
ResourceType type
Resource type. By default ResourceType::Undefined.
Definition Reflection.hpp:357
Int32 slot
Zero-based binding slot number. If this is -1, the binding slot was not specified....
Definition Reflection.hpp:363
A field denotes a data member of a record or constant buffer.
Definition Reflection.hpp:298
String name
Name of the field (also called a data member or variable).
Definition Reflection.hpp:303
UInt32 dimensions[2]
Number of matrix dimensions.
Definition Reflection.hpp:313
UInt32 offset
Local offset (in bytes) within the containing record or constant buffer.
Definition Reflection.hpp:322
FieldType type
Base type of the field. Note that this does not include the dimension of a vector type....
Definition Reflection.hpp:306
Vector< UInt32 > arrayElements
Number of array elements. If this container is empty, the field does not denote an array....
Definition Reflection.hpp:325
bool referenced
Specifies whether this field is referenced in the output shader unit. By default false.
Definition Reflection.hpp:300
UInt32 size
Size (in bytes) of the field. If this is 0xFFFFFFFF, the field size could not be determined....
Definition Reflection.hpp:319
Int32 typeRecordIndex
Index to the global record type. If this is -1, the field does not denote a record type....
Definition Reflection.hpp:316
Number of threads within each work group of a compute shader.
Definition Reflection.hpp:406
Int32 x
Number of shader compute threads in X dimension.
Definition Reflection.hpp:408
Int32 z
Number of shader compute threads in Z dimension.
Definition Reflection.hpp:414
Int32 y
Number of shader compute threads in Y dimension.
Definition Reflection.hpp:411
A record denotes a data structure declared in a shader.
Definition Reflection.hpp:330
UInt32 padding
Size (in bytes) of the padding that is added to the record. By default 0.
Definition Reflection.hpp:347
bool referenced
Specifies whether this record is referenced in the output shader unit. By default false.
Definition Reflection.hpp:332
String name
Name of the record (also called a structure, struct, or compound data).
Definition Reflection.hpp:335
UInt32 size
Size (in bytes) of the record. If this is 0xFFFFFFFF, the record size could not be determined....
Definition Reflection.hpp:344
Vector< Field > fields
Collection of all fields within this record.
Definition Reflection.hpp:341
Int32 baseRecordIndex
Optional index to the global base record type from which this record inherits. If this is -1,...
Definition Reflection.hpp:338
Structure for shader output statistics (e.g. texture/buffer binding points).
Definition Reflection.hpp:418
Vector< Attribute > outputAttributes
Shader output attributes.
Definition Reflection.hpp:430
NumThreads numThreads
Number of local threads in a compute shader.
Definition Reflection.hpp:448
Vector< Resource > resources
Texture and buffer resources.
Definition Reflection.hpp:436
Vector< SamplerState > samplerStates
Dynamic sampler states.
Definition Reflection.hpp:442
Vector< Attribute > inputAttributes
Shader input attributes.
Definition Reflection.hpp:427
Vector< Record > records
All records declared both globally and within constant buffers (also called structure,...
Definition Reflection.hpp:424
Vector< ConstantBuffer > constantBuffers
Constant buffers.
Definition Reflection.hpp:439
Vector< StaticSamplerState > staticSamplerStates
Static sampler states.
Definition Reflection.hpp:445
Vector< String > macros
All defined macros after pre-processing.
Definition Reflection.hpp:420
Vector< Attribute > uniforms
Single shader uniforms.
Definition Reflection.hpp:433
Resource reflection structure for textures, combined texture samplers, and buffers.
Definition Reflection.hpp:281
String name
Name of the resource.
Definition Reflection.hpp:289
Int32 slot
Zero-based binding slot number. If this is -1, the binding slot was not specified....
Definition Reflection.hpp:292
ResourceType type
Resource type. By default ResourceType::Undefined.
Definition Reflection.hpp:286
bool referenced
Specifies whether this resource is referenced in the output shader unit. By default false.
Definition Reflection.hpp:283
Static sampler state descriptor structure (D3D11_SAMPLER_DESC).
Definition Reflection.hpp:246
float mipLODBias
Definition Reflection.hpp:251
TextureAddressMode addressW
Definition Reflection.hpp:250
TextureAddressMode addressU
Definition Reflection.hpp:248
float minLOD
Definition Reflection.hpp:255
TextureAddressMode addressV
Definition Reflection.hpp:249
float borderColor[4]
Definition Reflection.hpp:254
float maxLOD
Definition Reflection.hpp:256
UInt32 maxAnisotropy
Definition Reflection.hpp:252
Filter filter
Definition Reflection.hpp:247
ComparisonFunc comparisonFunc
Definition Reflection.hpp:253
Sampler state reflection structure.
Definition Reflection.hpp:377
ResourceType type
Resource type. By default ResourceType::Undefined.
Definition Reflection.hpp:379
bool referenced
Specifies whether this record is referenced in the output shader unit. By default false.
Definition Reflection.hpp:388
Int32 slot
Zero-based binding slot number. If this is -1, the binding slot was not specified....
Definition Reflection.hpp:385
String name
Name of the sampler state.
Definition Reflection.hpp:382
Static sampler state reflection structure.
Definition Reflection.hpp:393
ResourceType type
Resource type. By default ResourceType::Undefined.
Definition Reflection.hpp:395
String name
Name of the static sampler state.
Definition Reflection.hpp:398
SamplerStateDesc desc
Descriptor of the sampler state.
Definition Reflection.hpp:401