<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLAccelerationStructureSizes/init(accelerationStructureSize:buildScratchBufferSize:refitScratchBufferSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So29MTLAccelerationStructureSizesa012accelerationB4Size018buildScratchBufferE005refitghE0ABSi_S2itcfc"
  },
  "title" : "init(accelerationStructureSize:buildScratchBufferSize:refitScratchBufferSize:)"
}
-->

# init(accelerationStructureSize:buildScratchBufferSize:refitScratchBufferSize:)

Creates an acceleration sizes instance with specific values.

```
init(accelerationStructureSize: Int, buildScratchBufferSize: Int, refitScratchBufferSize: Int)
```

## Parameters

`accelerationStructureSize`

The size of the acceleration structure, in bytes.

`buildScratchBufferSize`

The amount of scratch memory, in bytes, the GPU devices needs to build the acceleration structure.

`refitScratchBufferSize`

The amount of scratch memory, in bytes, the GPU device needs to refit the acceleration structure.

---

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)