Knowledge Base: Using Pix On Windows With Unreal Engine

A short article to call out that it is now possible to take Pix captures within the editor.

https://dev.epicgames.com/community/learning/knowledge-base/nzK3/using-pix-on-windows-with-unreal-engine

Hello, I have a trouble to get PIX work with UE.

I am using Unreal Engine 5.4.4 and PIX 2501.30, and the log says it can’t find WinPixGpuCapturer.dll.

I copied this dll to C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\Win64 then this log message disappears. But the PIX application icon is not shown at the upper-right corner of the Level Viewport and I also can’t use PIX to attach to Unreal Engine manually because it compalins that the dll is not at its installation location.

I used the debugger of Visual Studio 2022 to find out what’s wrong. The loading dll is handled in PixWinPluginModule.cpp:

        /** Container for graphics analysis com interface. */
	class FPixGraphicsAnalysisInterface
	{
	public:
		FPixGraphicsAnalysisInterface()
		{
#if PIX_PLUGIN_ENABLED
			WinPixGpuCapturerHandle = FPlatformProcess::GetDllHandle(L"WinPixGpuCapturer.dll");

			if (!WinPixGpuCapturerHandle)
			{
				if (FParse::Param(FCommandLine::Get(), TEXT("attachPIX")))
				{
					WinPixGpuCapturerHandle = PIXLoadLatestWinPixGpuCapturerLibrary();
				}
			}

			if (WinPixGpuCapturerHandle)
			{
				PIXSetHUDOptions(PIX_HUD_SHOW_ON_NO_WINDOWS);
			}
#endif // PIX_PLUGIN_ENABLED
		}

First, FPlatformProcess::GetDllHandle(L"WinPixGpuCapturer.dll") returns nullptr. I don’t know why but this knowledge base article haven’t mentioned anything that I need to add it to the search path for dlls.

Then , PIXLoadLatestWinPixGpuCapturerLibrary() also returns nullptr.

So what should I do? Is there a way to add the path of PIX to the search path for dlls?