XBOX One and UWP rant

I have experimented with the Universal Windows Platform (UWP) for some time now. I mainly maintain the UWP compatibility for Wicked Engine, a game engine written by me in C++ and using the DirectX 11 API for rendering. A perfect candidate for an UWP applications, because there need not be difficult porting for new platforms, supporting Desktop, Phone, tablet, augmented reality devices and XBOX One should be trivial (at least in theory).

The game engine originally only targetted the traditional Windows desktop environment, when I found out about the Universal Windows Platform, I knew I had to try it out. It turned out to be quite easy. I just needed to replace a few calls to the original WinAPI with UWP variants, like getting the screen resolution, the window handling and keyboard input. We also need to have an UWP compliant application entry point, you can see an example in the Wicked Engine Demos project. All the rest remains the same, like rendering code, joystick input, sound system, physics engine and the scripting interface. Only, for phone/tablet, you probably need to handle the touch screen, but UWP comes with a nice API for it.

I have been testing the Windows Phone and UWP desktop builds, and while I don’t think they are very relevant as of now, still feels nice to have support for them. Recently, I had the chance to acquire an XBOX One devkit for a short time, so I jumped on it and set up some demos in my engine and built it as an UWP app. The whole process was incredibly easy and straight forward, no change needed to be done in the code, the hardest part was launching the app on a “remote machine” which is the XBOX devkit itself. In the application, there were some lightweight scenes, like displaying a rotating image, static mesh, animated mesh, and some heavy rendering tasks, like and outdoor scene with multiple lights, shadows, instanced trees, particle systems, water, reflections, etc. The performance was abysmal in all of them. It really caught me off guard, because everything performed much better on my phone. It wasn’t even rendering most of the things in real time, but with one frame per second for the complex scene, and even the image rendering could barely do 50 FPS. With a little investigation, I have found out that I was creating my graphics device with the WARP rasterizer, which is a software renderer. The minimal requirements of the engine is D3D11, feature level 11.0 hardware, because it is making use of advanced rendering techniques, which need support for structured buffers, unordered access resources, compute shaders, tessellation and the like from the graphics driver. It could only create an appropriate graphics device in software mode, which is very slow because now the entire rendering runs on the CPU.

But can’t the XBOX One make use of D3D11 and even D3D12? The answer is, it can, but not with UWP apps. For developing high performance 3D applications, like games, you must be a registered XBOX developer, obtain the XBOX SDK (XDK) and build against the new platform that comes with it. Here’s what they say about it in the “known issues” of UWP development article on MSDN:

“UWP on Xbox One supports DirectX 11 Feature Level 10. DirectX 12 is not supported at this time.

Xbox One, like all traditional games consoles, is a specialized piece of hardware that requires a specific SDK to access its full potential. If you are working on a game that requires access to the maximum potential of the Xbox One hardware, you can register with the ID@XBOX program to get access to that SDK, which includes DirectX 12 support.”

Apart from that, the developer is also just getting access to limited system resources, like smaller amount of allowed memory allocation, reduced CPU speed and fewer threads with the UWP platform. PIX, the graphics debugger which comes with the XDK also didn’t recognize my application, but maybe that was because the WARP device. I could capture a frame with the Visual Studio graphics debugger, however.

This is just a really big letdown for me because I was really interested trying out the performance of my engine on a game console. I have no chance now, because I am not a registered developer, so no way of trying it out this time. Maybe I will look into the developer program, but I suspect that for a successful application, they need an actual company, business plan and probably much more.

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s