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 🔒
F2I32_FUNCTION 🔒
F2I64_FUNCTION 🔒
F2U32_FUNCTION 🔒
F2U64_FUNCTION 🔒
FREXP_FUNCTION 🔒
IMAGE_SAMPLE_BASE_CLAMP_TO_EDGE_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