<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSFunction/functionPrototype()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSFunction(im)functionPrototype"
  },
  "title" : "functionPrototype()"
}
-->

# functionPrototype()

```
func functionPrototype() -> String
```

## Discussion\abstract Get a source level representation of the function prototype
\discussion If your application is building its shaders from source at run time, this string will
declare the appropriate function prototypes for the conversion routine appropriate
to the version of MetalHDR you are currently running.

```
         Note: It is expected that most applications will not use this interface because they
         are building kernels offline from a .metallib. Such applications should simply:

            #include <MPSFunctions/MPSFunctions.h>

         in their .metal file, and declare any functions produced by this object using

            MPSFUNCTION_DECLARE_COLOR_CONVERSION( _functionName );

         or similar, depending on the type of the function created. The _functionName should
         match the name passed to the object -init method.
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)