Direct3D Creation Flags and Supported Formats on Xbox One

There are some differences between Direct3D on Xbox One versus Windows regarding Direct3D creation flags, D3D_DRIVER_TYPE formats, swap chain formats, planar video formats, getting the full-screen state, HLSL, Windows Imaging Component (WIC), and Draw calls.

Direct3D Creation Flags

Most of the creation flags for D3D11CreateDevice available for Windows Direct3D are not supported on Xbox One, and there are a few flags that are supported on Xbox One but not available in Windows (refer to D3D11_CREATE_DEVICE_FLAG).

For an easy small GPU performance gain, always specify D3D11_CREATE_DEVICE_FAST_KICKOFFS with Direct3D. This removes GPU overhead with every internal kick-off. This is not the default behavior for legacy internal reasons.

Also try performance with the D3D11_CREATE_DEVICE_WRITE_COMBINED_COMMAND_BUFFERS and D3D11_CREATE_DEVICE_WRITE_COMBINED_DYNAMIC_BUFFERS flags set for Direct3D. The improved cache effects may be a performance gain for your title.

D3D_DRIVER_TYPE

For Xbox One title apps, the D3D_DRIVER_TYPE_REFERENCE (software rasterizer) or D3D_DRIVER_TYPE_NULL (debug driver with no rendering capability) are not supported as potential settings for the D3D_DRIVER_TYPE field of the D3D11CreateDevice call.

Swap Chain Formats

Currently the formats that are supported for swap chains are listed below. The difference between some formats is simply the color ordering.

Titles can pass in the flag, DXGIX_SWAP_CHAIN_FLAG_QUANTIZATION_RGB_FULL, at swapchain creation time. This flag will adjust the display color space conversion appropriately for titles that are calibrated for RGB Full (black = 0, white = 255 for 8-bit depth). Titles should use this flag when the final front buffer has the black and white levels calibrated for 0 and 255 respectively. Titles should not use this flag when the final front buffer is calibrated for RGB Limited (black = 16, white = 235). Note this flag indicates the calibration of the content in the title’s front buffer, not the calibration of the output television.

Planar Video Formats

The current supported video formats for Xbox One are NV12, P010, P016, 420_opaque, and NV11.

For more information refer to the DXGI_FORMAT enumeration.

Getting the Full-Screen State

Do not call GetFullScreenState on Xbox One, because that method is for desktop DirectX applications only. Instead, if you need to know when your first graphics are shown to the user, monitor for the following Activated event.

During the application process activation, your code receives a CoreWindow::Activated event. This Activated event indicates that your game window is brought to the foreground by the system, is full-screen, and is receiving all the user inputs.

You should assume your game window stays in the same state as long as your game window is in the running PLM state.

Refer also to the white paper:

High Level Shader Language (HLSL)

The High Level Shader Language (HLSL) on Xbox One is a full implementation of Microsoft HLSL.

The HLSL and graphics pipeline are documented on MSDN. However there are a number of small documentation errors:

Windows Imaging Component (WIC)

The Windows Imaging Component (WIC) is an extensible platform that provides a low-level API for digital images.

Xbox One supports WIC2. For details of the new features of WIC2 refer to What’s New for WIC in Windows 8, and for details of the WIC format refer to Windows Imaging Component, or DirectXTex texture processing library.

There are a number of caveats to the Xbox One title (Game OS) support of WIC:

ID3D11DeviceContext::DrawAuto

The ID3D11DeviceContext::DrawAuto call is the only Draw call that is not internally optimized using the fast path process. DrawAuto submits work of an unknown size that has been processed by the input assembler, vertex shader, and stream-output stages.

See also

DirectX