UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MetalCaptureManager.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "MetalRHIPrivate.h"
6
8
10{
11public:
12 FMetalCaptureManager(MTL::Device* Device, FMetalCommandQueue& Queue);
14
15 // Called by the MetalRHI code to trigger the provided capture scopes visible in Xcode.
16 void PresentFrame(uint32 FrameNumber);
17
18 // Programmatic captures without an Xcode capture scope.
19 // Use them to instrument the code manually to debug issues.
20 void BeginCapture(void);
21 void EndCapture(void);
22
23private:
24 MTL::Device* Device;
25 FMetalCommandQueue& Queue;
26 bool bSupportsCaptureManager;
27
28private:
29 enum EMetalCaptureType
30 {
31 EMetalCaptureTypeUnknown,
32 EMetalCaptureTypeFrame, // (BeginFrame-EndFrame) * StepCount
33 EMetalCaptureTypePresent, // (Present-Present) * StepCount
34 EMetalCaptureTypeViewport, // (Present-Present) * Viewports * StepCount
35 };
36
37 struct FMetalCaptureScope
38 {
39 EMetalCaptureType Type;
40 uint32 StepCount;
41 uint32 LastTrigger;
42 MTL::CaptureScope* MTLScope;
43 };
44
45 TArray<FMetalCaptureScope> ActiveScopes;
46};
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition MetalCaptureManager.h:10
void PresentFrame(uint32 FrameNumber)
Definition MetalCaptureManager.cpp:46
void BeginCapture(void)
Definition MetalCaptureManager.cpp:76
void EndCapture(void)
Definition MetalCaptureManager.cpp:84
~FMetalCaptureManager()
Definition MetalCaptureManager.cpp:42
Definition MetalCommandQueue.h:39
Definition Array.h:670