Module writer

Source

ModulesΒ§

workgroup_mem_init πŸ”’
Initializing workgroup variables is more tricky for Metal because we have to deal with atomics at the type-level (which don’t have a copy constructor).

StructsΒ§

ArraySizeMember πŸ”’
Wrapper for generating struct _mslBufferSizes member names for runtime-sized array lengths.
ClampedLod πŸ”’
Wrapper for identifier names for clamped level-of-detail values
ExpressionContext πŸ”’
Reinterpreted πŸ”’
Wrapper for reinterpreted variables using as_type<target_type>(orig).
StatementContext πŸ”’
TexelAddress πŸ”’
Values needed to select a particular texel for ImageLoad and ImageStore.
TypeContext πŸ”’
TypedGlobalVariable πŸ”’
Writer

EnumsΒ§

FunctionOrigin πŸ”’
LevelOfDetail πŸ”’
A level of detail argument.
WrappedFunction πŸ”’

ConstantsΒ§

ABS_FUNCTION πŸ”’
ARGUMENT_BUFFER_WRAPPER_STRUCT πŸ”’
For some reason, Metal does not let you have metal::texture<..>* as a buffer argument. However, if you put that texture inside a struct, everything is totally fine. This baffles me to no end.
ATOMIC_COMP_EXCH_FUNCTION πŸ”’
ATOMIC_REFERENCE πŸ”’
CLAMPED_LOD_LOAD_PREFIX πŸ”’
Prefix for cached clamped level-of-detail values for ImageLoad expressions.
DIV_FUNCTION πŸ”’
EXTERNAL_TEXTURE_WRAPPER_STRUCT πŸ”’
Name of the struct that is declared to wrap the 3 textures and parameters buffer that crate::ImageClass::External variables are lowered to, allowing them to be conveniently passed to user-defined or wrapper functions. The struct is declared in Writer::write_type_defs.
F2I32_FUNCTION πŸ”’
F2I64_FUNCTION πŸ”’
F2U32_FUNCTION πŸ”’
F2U64_FUNCTION πŸ”’
FREXP_FUNCTION πŸ”’
IMAGE_LOAD_EXTERNAL_FUNCTION πŸ”’
IMAGE_SAMPLE_BASE_CLAMP_TO_EDGE_FUNCTION πŸ”’
IMAGE_SIZE_EXTERNAL_FUNCTION πŸ”’
MODF_FUNCTION πŸ”’
MOD_FUNCTION πŸ”’
NAMESPACE πŸ”’
NEG_FUNCTION πŸ”’
RAY_QUERY_FIELD_INTERSECTION πŸ”’
RAY_QUERY_FIELD_INTERSECTOR πŸ”’
RAY_QUERY_FIELD_READY πŸ”’
RAY_QUERY_FUN_MAP_INTERSECTION πŸ”’
RAY_QUERY_MODERN_SUPPORT πŸ”’
RAY_QUERY_TYPE πŸ”’
REINTERPRET_PREFIX πŸ”’
Prefix for reinterpreted expressions using as_type<T>(...).
RT_NAMESPACE πŸ”’
WRAPPED_ARRAY_FIELD πŸ”’

TraitsΒ§

NameKeyExt πŸ”’

FunctionsΒ§

needs_array_length πŸ”’
put_numeric_type πŸ”’
Write the Metal name for a Naga numeric type: scalar, vector, or matrix.
scalar_is_int πŸ”’
separate πŸ”’
should_pack_struct_member πŸ”’

Type AliasesΒ§

BackendResult πŸ”’
Shorthand result used internally by the backend