Building an Unreal Engine application with Mali Graphics Debugger support (UE 4.15 onwards)

With Unreal Engine 4.15, Epic introduced the ability to directly enable profiling on mobile devices from the editor. In a previous blog article, we discussed how to enable this feature on pre 4.15 engine versions, the following content applies to 4.15 onwards. This article was written using MGD version 4.5.

Activating Mali Graphics Debugger has never been easier, from now on you will be able to activate it simply by selecting the option in the project settings. The first step is to open your project, then open the project settings window. From there, in the left menu,  find the Android option then Platforms on the right, Graphic Debugger and finally, select Mali Graphics Debugger in the list.

Once selected, you will have to enter the path to the Mali Graphics Debugger installation on your host computer. In order for this to work, you will need to have a working version of Mali Graphics Debugger installed on your system, more information on how to install it here.

The next step will be to install the MGD Daemon onto your target device. To do this, locate MGD installation folder  and inside target\android\arm install MGDDaemon using:

adb install -r MGDDaemon.apk

Before running your app you will need to run this command from the host PC (please ensure that the device is visible by running adb devices first):

adb forward tcp:5002 tcp:5002 

Run the MGD daemon application on the target phone and activate the daemon itself:

At that point you can connect it to MGD on the host PC, start your application and begin debugging it. Please refer to the MGD manual for more in-depth information on how to use it.

In some cases, when you have really complex applications, your game thread may timeout waiting for the render thread, you will eventually see this in the log (note:  adb logcat –s “UE4” to get the log):

GameThread timed out waiting for RenderThread after 30.01 secs

In that case simply runs this in Unreal console (4 fingers tap by default), to disable timeout:

g.TimeoutForBlockOnRenderFence 9999999

Following these steps you should be able to use MGD with Unreal applications on any Mali based platform. If you have any issues please raise them on the community and someone will be more than happy to assist you through the process.

Anonymous
Graphics & Multimedia blog