Namespaces

Enumerations

enum BufferPackingStandard
Name Value
BufferPackingStd140 0
BufferPackingStd430 1
BufferPackingStd140EnhancedLayout 2
BufferPackingStd430EnhancedLayout 3
BufferPackingHLSLCbuffer 4
BufferPackingHLSLCbufferPackOffset 5
BufferPackingScalar 6
BufferPackingScalarEnhancedLayout 7

Defined at line 139 of file ../../third_party/spirv-cross/src/spirv_cross.hpp

enum Types
Name Value
TypeNone 0
TypeType 1
TypeVariable 2
TypeConstant 3
TypeFunction 4
TypeFunctionPrototype 5
TypeBlock 6
TypeExtension 7
TypeExpression 8
TypeConstantOp 9
TypeCombinedImageSampler 10
TypeAccessChain 11
TypeUndef 12
TypeString 13
TypeCount 14

Defined at line 355 of file ../../third_party/spirv-cross/src/spirv_common.hpp

enum ExtendedDecorations
Name Value Comments
SPIRVCrossDecorationBufferBlockRepacked 0

Marks if a buffer block is re-packed, i.e. member declaration might be subject to PhysicalTypeID remapping and padding.

SPIRVCrossDecorationPhysicalTypeID 1

A type in a buffer block might be declared with a different physical type than the logical type.
If this is not set, PhysicalTypeID == the SPIR-V type as declared.

SPIRVCrossDecorationPhysicalTypePacked 2

Marks if the physical type is to be declared with tight packing rules, i.e. packed_floatN on MSL and friends.
If this is set, PhysicalTypeID might also be set. It can be set to same as logical type if all we're doing
is converting float3 to packed_float3 for example.
If this is marked on a struct, it means the struct itself must use only Packed types for all its members.

SPIRVCrossDecorationPaddingTarget 3

The padding in bytes before declaring this struct member.
If used on a struct type, marks the target size of a struct.

SPIRVCrossDecorationInterfaceMemberIndex 4

The padding in bytes before declaring this struct member.
If used on a struct type, marks the target size of a struct.

SPIRVCrossDecorationInterfaceOrigID 5

The padding in bytes before declaring this struct member.
If used on a struct type, marks the target size of a struct.

SPIRVCrossDecorationResourceIndexPrimary 6

The padding in bytes before declaring this struct member.
If used on a struct type, marks the target size of a struct.

SPIRVCrossDecorationResourceIndexSecondary 7

Used for decorations like resource indices for samplers when part of combined image samplers.
A variable might need to hold two resource indices in this case.

SPIRVCrossDecorationResourceIndexTertiary 8

Used for resource indices for multiplanar images when part of combined image samplers.

SPIRVCrossDecorationResourceIndexQuaternary 9

Used for resource indices for multiplanar images when part of combined image samplers.

SPIRVCrossDecorationExplicitOffset 10

Marks a buffer block for using explicit offsets (GLSL/HLSL).

SPIRVCrossDecorationBuiltInDispatchBase 11

Apply to a variable in the Input storage class; marks it as holding the base group passed to vkCmdDispatchBase(),
or the base vertex and instance indices passed to vkCmdDrawIndexed().
In MSL, this is used to adjust the WorkgroupId and GlobalInvocationId variables in compute shaders,
and to hold the BaseVertex and BaseInstance variables in vertex shaders.

SPIRVCrossDecorationDynamicImageSampler 12

Apply to a variable that is a function parameter; marks it as being a "dynamic"
combined image-sampler. In MSL, this is used when a function parameter might hold
either a regular combined image-sampler or one that has an attached sampler
Y'CbCr conversion.

SPIRVCrossDecorationBuiltInStageInputSize 13

Apply to a variable in the Input storage class; marks it as holding the size of the stage
input grid.
In MSL, this is used to hold the vertex and instance counts in a tessellation pipeline
vertex shader.

SPIRVCrossDecorationTessIOOriginalInputTypeID 14

Apply to any access chain of a tessellation I/O variable; stores the type of the sub-object
that was chained to, as recorded in the input variable itself. This is used in case the pointer
is itself used as the base of an access chain, to calculate the original type of the sub-object
chained to, in case a swizzle needs to be applied. This should not happen normally with valid
SPIR-V, but the MSL backend can change the type of input variables, necessitating the
addition of swizzles to keep the generated code compiling.

SPIRVCrossDecorationInterpolantComponentExpr 15

Apply to any access chain of an interface variable used with pull-model interpolation, where the variable is a
vector but the resulting pointer is a scalar; stores the component index that is to be accessed by the chain.
This is used when emitting calls to interpolation functions on the chain in MSL: in this case, the component
must be applied to the result, since pull-model interpolants in MSL cannot be swizzled directly, but the
results of interpolation can.

SPIRVCrossDecorationWorkgroupStruct 16

Apply to any struct type that is used in the Workgroup storage class.
This causes matrices in MSL prior to Metal 3.0 to be emitted using a special
class that is convertible to the standard matrix type, to work around the
lack of constructors in the 'threadgroup' address space.

SPIRVCrossDecorationOverlappingBinding 17

Apply to any struct type that is used in the Workgroup storage class.
This causes matrices in MSL prior to Metal 3.0 to be emitted using a special
class that is convertible to the standard matrix type, to work around the
lack of constructors in the 'threadgroup' address space.

SPIRVCrossDecorationCount 18

Apply to any struct type that is used in the Workgroup storage class.
This causes matrices in MSL prior to Metal 3.0 to be emitted using a special
class that is convertible to the standard matrix type, to work around the
lack of constructors in the 'threadgroup' address space.

Defined at line 1611 of file ../../third_party/spirv-cross/src/spirv_common.hpp

Records

Functions

  • void report_and_abort (const std::string & msg)

    Defined at line 48 of file ../../third_party/spirv-cross/src/spirv_cross_error_handling.hpp

  • template <typename... Ts>
    std::string join (Ts &&... ts)

    Helper template to avoid lots of nasty string temporary munging.

    Defined at line 191 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • std::string merge (const SmallVector<std::string> & list, const char * between)

    Defined at line 198 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • template <typename T, typename std::enable_if<!std::is_floating_point<T>::value, int>::type = 0>
    std::string convert_to_string (const T & t)

    Make sure we don't accidentally call this with float or doubles with SFINAE.

    Have to use the radix-aware overload.

    Defined at line 213 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • std::string convert_to_string (float t, char locale_radix_point)

    Defined at line 270 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • std::string convert_to_string (double t, char locale_radix_point)

    Defined at line 284 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • template <typename T>
    T & variant_get (Variant & var)

    Defined at line 1580 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • template <typename T>
    const T & variant_get (const Variant & var)

    Defined at line 1586 of file ../../third_party/spirv-cross/src/spirv_common.hpp

  • template <typename Ttypename... P>
    T & variant_set (Variant & var, P &&... args)

    Defined at line 1592 of file ../../third_party/spirv-cross/src/spirv_common.hpp