Contents

MTLFunctionConstant

A constant that specializes the behavior of a shader.

Declaration

class MTLFunctionConstant

Overview

Don’t create an MTLFunctionConstant instance directly. Instead, the list of function constants for a function by querying the functionConstants property of an MTLFunction instance.

An MTLFunctionConstant instance should only be obtained from a nonspecialized function created with the makeFunction(name:) method. You only need an MTLFunctionConstant instance if you don’t have sufficient information to create an MTLFunctionConstantValues instance used to create a specialized function with the makeFunction(name:constantValues:) or makeFunction(name:constantValues:completionHandler:) method.

Topics

Reading the function constant’s properties

See Also

Compile-time variant functions