UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RHIDiagnosticBuffer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "RHIBreadcrumbs.h"
6
13{
14public:
15
16 // Counterpart to UEDiagnosticBuffer in shader code
17 struct FLane
18 {
21 union
22 {
25 float AsFloat[4];
27 };
28
29 static_assert(sizeof(FLane) == 6 * sizeof(uint32), "Remember to change UEDiagnosticBuffer layout in the shaders when changing FLane");
30
31 struct FQueue
32 {
33 // Counterpart to UEDiagnosticMaxLanes in shader code
34 static constexpr uint32 MaxLanes = 64;
36
37 #if WITH_RHI_BREADCRUMBS
38 // GPU breadcrumb markers
41 #endif
42 };
43
44 static constexpr uint32 SizeInBytes = sizeof(FQueue);
45
46 // Persistently mapped diagnostic buffer data, initialized by platform-specific code
47 FQueue* Data = nullptr;
48
49 // Log the GPU progress of the given queue to the Error log if breadcrumb data is available
50 FString RHICORE_API GetShaderDiagnosticMessages(uint32 DeviceIndex, uint32 QueueIndex, const TCHAR* QueueName);
51};
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition RHIDiagnosticBuffer.h:13
static constexpr uint32 SizeInBytes
Definition RHIDiagnosticBuffer.h:44
FString RHICORE_API GetShaderDiagnosticMessages(uint32 DeviceIndex, uint32 QueueIndex, const TCHAR *QueueName)
Definition RHIDiagnosticBuffer.cpp:6
FQueue * Data
Definition RHIDiagnosticBuffer.h:47
Definition RHIDiagnosticBuffer.h:18
uint32 AsUint[4]
Definition RHIDiagnosticBuffer.h:24
int32 AsInt[4]
Definition RHIDiagnosticBuffer.h:23
float AsFloat[4]
Definition RHIDiagnosticBuffer.h:25
union FRHIDiagnosticBuffer::FLane::@1902 Payload
uint32 Counter
Definition RHIDiagnosticBuffer.h:19
uint32 MessageID
Definition RHIDiagnosticBuffer.h:20
Definition RHIDiagnosticBuffer.h:32
static constexpr uint32 MaxLanes
Definition RHIDiagnosticBuffer.h:34
FLane Lanes[MaxLanes]
Definition RHIDiagnosticBuffer.h:35