MacGraphicsSwitching Plugin Question

Hi, and sorry if I’m posting on the wrong forum or this or a similar question has been asked already… (if so, a link would be appreciated)

So, I was checking out the MacGraphicsSwitching-Plugin, basically because I’m still not satisfied with the performance of the UEditor on my machine (which is a late 2013-MBP) and was looking for misconfigurations I may have made. As the has an internal Iris Pro chip and the nVidia 750 GT, I figured maybe UE is using the “wrong” render device.

Everything here is observed on a source-build from the 4.7 branch (6c3c1ce).

So, the plugin correctly enumerates my graphics devices, but the selection doesn’t update, and I’m not sure if the selected renderer gets switched if I’m selecting the Geforce (standard is “Iris Pro + nVidia”). I looked into the source of the plugin (Plugins/Editor/MacGraphicsSwitching/Source) and found the function seemingly responsible for switching the devices, which should be SMacGraphicsSwitchingWidget::OnSelectionChanged(…). Basically it sets a variable with this code:


static const auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Mac.ExplicitRendererID"));
	if ( CVar )
	{
		CVar->Set( (int32)InItem->RendererID );
	}

Could someone point me to the code that is responsible for picking up on changes to that or am I missing something / getting smth. completely wrong?

Bascially, I would like to know explicitly which device UE4 is using on my machine so I know if I can’t expect any better performance.

Thanks for any pointers or help!

Hi ,

By default the graphics-switching should be disabled & therefore the system will use the Nvidia GPU. If you choose an explicit renderer then that will be selected & UE4 will crash if it can’t enable it. The code to update the pop-up box display is obviously broken & I’ll need to fix that, if you want to go back to the default behaviour just select the combined entry at the top. Also don’t enable the automatic switching option if you want top performance as that allows the OS to decide which GPU to use and it will default to Intel until some other program enables the Nvidia GPU.

The code that actually switches renderers is in Engine/Source/Runtime/OpenGLDrv/Private/Mac/MacOpenGLContext.cpp. It is gnarly and not very user-friendly. If you just want to quickly check which renderer is in-use then you can always download the Graphics Tools from Apple’s developer site (they are in the additional download section here: Sign In - Apple, latest version is: Graphics Tools for Xcode 6.1) & take a look in OpenGL Driver Monitor: File > Renderer Info. You’ll know if the Nvidia GPU is in use by looking at the driver monitor for it - it even has a GPU Core Utilisation parameter to tell you how heavily utilised it is.