Files
UnrealEngineUWP/Engine/Source/Runtime/AVEncoder/Public/AVEncoderDebug.h
David Harvey 96925205c4 Fix DEBUG_SET_D3D11_OBJECT_NAME for Edit & Continue.
- Cannot use __LINE__ as a compile-time constant because it cannot be used with Edit & Continue (/ZI)
 - see C2975 in MSDN

#jira UE-155846
#rnx
#rb Nuno.Leiria
#preflight 62a35a3a0251cacef0b5b652

[CL 20595931 by David Harvey in ue5-main branch]
2022-06-10 11:05:14 -04:00

20 lines
806 B
C

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#define DEBUG_SET_D3D11_OBJECT_NAME(D3D11Object, Name) \
{\
static GUID _D3DDebugObjectNameW = {0x4cca5fd8,0x921f,0x42c8,{0x85,0x66,0x70,0xca,0xf2,0xa9,0xb7,0x41}}; \
FString SetName = FString::Printf(TEXT("%s (%s:%d)"), *FString(Name), *FPaths::GetCleanFilename(FString(__FILE__)), __LINE__); \
D3D11Object->SetPrivateData(_D3DDebugObjectNameW, SetName.Len() * sizeof(TCHAR), *SetName); \
}
#define DEBUG_D3D11_REPORT_LIVE_DEVICE_OBJECT(D3D11Device) \
if((D3D11Device)) \
{ \
TRefCountPtr<ID3D11Debug> DebugInterface; \
if(D3D11Device->QueryInterface(__uuidof(ID3D11Debug), (void**)DebugInterface.GetInitReference()) == S_OK) \
{ \
DebugInterface->ReportLiveDeviceObjects(D3D11_RLDO_DETAIL | D3D11_RLDO_IGNORE_INTERNAL); \
} \
}