UWP and Xbox: GPU Engine Utilization, Frame Rate, and Other Disasters: Help!

So - our studio isn’t able to get onto the ID@Xbox program because reasons, so we’re a little stuck on the UWP platform. Or whatever the correct language is.

We’re on Unity 2017.3.0f3, and primarily trying to resolve our framerate issues while deploying to Xbox. On our Windows 10 target machine we’re getting 90FPS and on our Xbox we’re getting… 15. Or worse. It’s bad.

Ordinarily I’d chalk this up to “I did something wrong” or “my code scaled badly” or something, but I double checked some things and noticed that we had plenty of wiggle room on memory/RAM and our CPU usage was below 12%.

I went to the device portal and it turns out we’re at 98% graphics engine 0, and at no usage for the other graphics engines. (See attached screenshot.)

Two questions:

  • What does that even MEAN?!
  • How would I go about using the other graphics engines.

Thanks in advance!

First of all, which Xbox One OS version are you on?

I don’t think you need to do anything special to fully utilize the GPU: just make sure that the app type on Xbox is set to “Game” as opposed to “App” (otherwise it won’t give you full system resources). I don’t know if you can trust the device portal completely, though.

Lastly, what kind of PC specs are you getting 90 fps on? Is 15 FPS on Xbox One or Xbox One X?

The Xbox One S is running the latest; 10.0.16299.5101.

It is definitely set to “Game”. I don’t think we can trust the portal completely either, but we’re relatively confident that the something graphics-related is the bottleneck (not memory access or computations or… anything else). Engine 0 running at max and Engine 1 running at 0% seems close to the truth (unless of course there aren’t actually any other Engines to utilize to being with… which I would believe…).

The PC is running

  • NVIDIA GeForce GTX 760
  • Intel i7-4770 @ 3.40GHz
  • 16 GB RAM

I mean it’s definitely rendering related - if we disable/remove all of the MeshRenderers (render only the menus and run only the core game logic) we get 140 FPS on the PC and 95 FPS on the Xbox… :frowning:

I guess we could be doing something dumb when it comes to lighting or whatever - we have less than 65K tris in the scene we’re currently considering.

It could be that secondary engines are for non-3D rendering stuff. For instance, copy engine, video encode engine, video decode engine, compute engine. So it would make sense that those engines are idle if you’re doing none of the tasks. I also think it’s unlikely that the Xbox has multiple 3D engines on its GPU.

Did you try looking at Unity profiler?

GTX 760 is slightly faster (probably 20-40%) than the Xbox One GPU, but that doesn’t explain 6 times frame time difference. However, i7-4770 IS around 5-6 times faster than the Xbox One CPU, so if you’re CPU bound, that would explain it.

Fair enough.

Yeah I looked at the profiler and the CPU info, and we’re definitely not CPU-bound, using less than 20% of the Xbox’s CPU. I’m pretty confident we’re trying to cutdown on GPU expenses, but with less than 65K tris, I just don’t know what to try next asides from messing around with the lighting or other settings.

… I guess as an aside, is there anything we can do about the following output without being in the ID@Xbox program?:

/*
SC_DLL - Shader Compilation - +14.1 ms (4731.0 ms)
Compilation Reason: No precompiled shaders found, shader blob was either not created by Xbox tools, or was created with the -noprecompile flag.
*/

20% of a single CPU core, or 20% of all cores? Xbox One has a lot of cores, and it’s likely that your game is using up a full core and a half of another core, for instance. That one core being the bottleneck could be all it takes. Do you mind showing a screenshot of Unity profiler? You aren’t running the game in debug config, are you?

No, unfortunately not. We’re in discussions with Microsoft on how we could improve it, but at this time you’ll just have to deal with it.

Microsoft has stated that only 40% of the GPU can be accessed with DX11 in UWP. Switch to DX12, and check the GPU use again. Instead of full use of GPU engine utilisation you’ll see the first core being used instead. It seems like its only rendering single core. For me though, performance is noticably worse with DX12 and there are a handful of bugs. Switching a dx12 app to game mode will cause the game to crash until the xbox itself is restarted.

There isn’t much documentation for any of this. As far as i can tell though performance is not meant to be so low, especially on DX12. It’s not clear if it’s a unity problem or a microsoft problem

The information on these two links seem conflicting:

Oh and here’s a tip. If you go into dev settings on the xbox portal you can treat new installations as games by default and that will workaround the dx12 bug without restarting the console and save you having to do it each deployment

Did you update your xbox to the latest version? DX12 doesn’t work well until the last firmware in my experience.

Yeah I’m on the latest version and i can’t see any difference with DX12, that crash is still there, but I did get a good performance boost with DX11 out of that update

Can we have a bug report on that crash?

Hi,

any update on your situation? I am experiencing this as well. This is the first time deploying to xbox, so I am not sure what to expect… but I am gpu bound as well, and showing the same thing as you, only the the first engine used, and none of the others.

Also, I cant use the GPU profiler in the editor, it never works for me. Any tip for profiling the xbox GPU so I can begin to debug?
Thanks for the help

An update from me…

I tried a DX12 build, and that did seem to improve framerate, from 50fps to 65-70fps now. Though the xbox device portal still only shows one gpu engine being utilized, though now it is engine 1, not engine 0. But essentially the same, 90% usage for engine 1 and 0 for all the others.

Does anyone have information about this case ?
There is no information anywhere why only 1 engine from GPU is used.

Anyone got any reason why a deployed UWP only uses 1 graphics engine? I get the same visual report from the xbox device portal also and the project runs at around 15-20 fps

Xbox One only has one 3D graphics engine. In fact, most GPUs only have one graphics engine. If you ran any game on PC, you’ll see that most games only use one engine (unless you use async compute):

The GPU literally cannot use other engines for rendering. Your performance problems don’t come from the fact that it only uses one engine.

I suggest switching to DirectX 12 if you’re targeting Xbox One. The DirectX 11 driver for UWP apps isn’t great (it’s slow) and only supports D3D11 Feature Level 10.1. Also, keep in mind when comparing performance to PC that Xbox One has a very weak CPU that’s slower than modern mobile phones. The GPU is also equivalent to a mid-range PC GPU from 7 years ago.

Lastly, make sure you’re deploying in “Release” or “Master” configuration. “Debug” configuration is intentionally slow due to turned off optimizations.

1 Like