<!--
{
  "availability" : [
    "iOS: 8.0.0 - 10.0.0",
    "iPadOS: 8.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.11.0 - 10.12.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLTexture/rootResource",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLTexture(py)rootResource"
  },
  "title" : "rootResource"
}
-->

# rootResource

The resource that owns the storage for this texture.

```
var rootResource: (any MTLResource)? { get }
```

## Discussion

If the value is `nil`, then this texture image owns its own data. Otherwise, this value is the [`MTLResource`](/documentation/Metal/MTLResource) instance used to create the texture. For example, it might be a texture that uses the contents of an [`MTLBuffer`](/documentation/Metal/MTLBuffer) object or a texture view that reinterprets the contents of another [`MTLTexture`](/documentation/Metal/MTLTexture).

---

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)