<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "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" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/ComputeNodeGraph/ValueType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Compute Graph",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:12ComputeGraph0a4NodeB0V9ValueTypeO"
  },
  "title" : "ComputeNodeGraph.ValueType"
}
-->

# ComputeNodeGraph.ValueType

Describes the storage and layout of a port’s value, ranging from Metal primitives
and structures to opaque references and stateful bindings.

```
enum ValueType
```

## Topics

### Enumeration Cases

[`case data(length: Int)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/data(length:))

Value contains fixed-length data of the given length.

[`case dataType(type: MTLDataType)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/dataType(type:))

Legacy. Do not construct in new code.

[`case enumeration(typeName: String)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/enumeration(typeName:))

Value is from enumeration with the given typeName

[`case none`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/none)

No storage for this value.

[`case opaque(typeName: String)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/opaque(typeName:))

Value is an opaque value of the given type

[`case pointer(type: ComputeNodeGraph.PointerDefinition)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/pointer(type:))

[`case primitive(type: ComputeNodeGraph.DataType)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/primitive(type:))

Value is stored as a primitive data type.

[`case state(definition: ComputeNodeGraph.StateDefinition)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/state(definition:))

Value is a stored state value

[`case string`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/string)

Value is a utf-8 encoded string

[`case structure(definition: ComputeNodeGraph.StructureDefinition)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/structure(definition:))

Value is a structure with the given definition.

[`case texture(typeName: String)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/texture(typeName:))

Value is an texture with the given type name (e.g. texture2d)

### Type Methods

[`static func primitive(MTLDataType) -> ComputeNodeGraph.ValueType`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/primitive(_:))

[`static func structure(typeName: String, layout: ComputeNodeGraph.StructureLayout) -> ComputeNodeGraph.ValueType`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/structure(typeName:layout:))

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)