Skip to main content

Module capture

Module capture 

Source
Expand description

Metal GPU capture facilities for debugging.

Corresponds to Metal/MTLCaptureManager.hpp and Metal/MTLCaptureScope.hpp.

The capture API allows you to programmatically capture GPU workloads for debugging in Xcode or saving to a GPU trace document.

§Example

use mtl_gpu::capture::CaptureManager;
use mtl_gpu::device::system_default;

let device = system_default().expect("no Metal device");
let manager = CaptureManager::shared();

// Start capturing with default settings
manager.start_capture_with_device(&device);

// ... perform GPU work ...

manager.stop_capture();

Structs§

CaptureDescriptor
Descriptor for configuring a GPU capture session.
CaptureManager
The singleton manager for GPU capture operations.
CaptureScope
A capture scope that defines the boundaries of a GPU capture.