A description of a structure.


class MTLStructType : MTLType


MTLStructType is part of the reflection API that allows Metal framework code to query details of a struct that is passed as an argument of a Metal shading language function. Don't create MTLStructType objects directly; instead query the bufferStructType property of a MTLArgument object, or call the structType() method for a MTLStructMember object. To examine the details of the struct, you can recursively drill down the members property of the MTLStructType object, which contains details about struct members, each of which is represented by a MTLStructMember object.


Obtaining Information about Struct Members

var members: [MTLStructMember]

An array of objects that describe the fields in the struct.

func memberByName(String) -> MTLStructMember?

Provides a representation of a struct member.

class MTLStructMember

An object that provides information about a field in a struct.


Inherits From

Conforms To

See Also

Function Argument Information

struct MTLPipelineOption

The compilation options that determine which argument information to provide.

class MTLComputePipelineReflection

Information about the arguments of a compute function.

class MTLRenderPipelineReflection

Information about the arguments of a graphics function.

class MTLArgument

Information about an argument of a graphics or compute function.

class MTLType

A description of a data type.

class MTLArrayType

A description of an array.

class MTLPointerType

A description of a pointer.

class MTLTextureReferenceType

A description of a texture.

enum MTLDataType

Data types for function arguments.

enum MTLArgumentType

The resource type associated with an argument of a function.

enum MTLArgumentAccess

Function access restrictions to argument data in the shading language code.