What’s New in the August 2014 Xbox One XDK

The August 2014 release of the Xbox One XDK from Microsoft contains the following new features, tools, and documentation. For features that shipped in a previous release of the Xbox One XDK, see the What’s New document for that release, available from Features Introduced in Previous Releases.

Sections:

Release Notes and Xbox One XDK Updates

The most recent release notes for and updates to the Xbox One XDK can always be found on Xbox One XDK Software Downloads on the Xbox Game Developer site. For access, log in with your ID and password on https://developer.microsoft.com/en-us/games/xbox/partner/index; at the top of the page, point to Development and click Downloads.

You can check with your account manager for the latest information about upcoming Xbox One XDK releases.

Xbox One XDK Version Info

The August 2014 Xbox One XDK contains the latest tools and libraries for Xbox One.

What’s new in the August 2014 XDK

Roadmap

The Xbox One Developer Roadmap on the XGD site has been updated with projections of developer-facing feature work from the August XDK through Q4 of this year. The roadmap is intended to help developers plan their implementation schedules around upcoming feature and tooling efforts for the Xbox One console and related services.

Table of Contents

Audio

Developer Tools

Graphics

Input

PIX

SmartGlass

System

Audio

Ability to query the VID/PID of USB Audio Microphones
The audio stack now exposes the ability to acquire the vendor and product ID (VID/PID) of an attached USB microphone. Game developers can use this information to determine if their USB class microphone is attached.

Balanced headset and Kinect microphone levels
Headset Microphone levels and Kinect microphone levels are now balanced. Headset microphones now have automatic gain control applied.

Latency reduction on the render path for exclusive titles
A change in the August XDK reduces audio render path latency by approximately 5 milliseconds.

Developer Tools

Xbox One Manager
We’ve added the following functionality to Xbox One Manager for August:

We would like to get your feedback. If you have feedback or feature requests for the Xbox One Manager you can now send us your feedback directly from inside Xbox One Manager. Go to File->About and click on the Send feedback link.

For more information about Xbox One Manager, see Xbox One Manager.

Xbox One Neighborhood
You can now browse the file system of a running game in Windows File Explorer. Simply navigate to \myconsole\RunningTitle\Drives to view the Game, Scratch and Temp drives while the title is running. This complements the Xbox Neighborhood feature we’ve already shipped that allows you to browse the game and scratch drives while the title is not running. In this release \myconsole\RunningTitle is read-only.

Note RunningTitle is only available in Windows File Explorer (it is implemented through a shell extension), it is not available to command line tools. See Xbox One Neighborhood: Accessing the Console File System from Your PC for more information.

Network Capture Tools
Developers can now collect network packet captures directly from consoles using the command-line tool, xbtrace.

xbCapture now supports GameDVR capture
You can now use xbCapture /c to capture GameDVR clips from the console. This will capture up to 300 seconds of GameDVR to a file that you specify. For more information, see Screen Capture (xbcapture.exe).

Improvements to Package Utility
PackageUtil.exe now supports comparing two packages to give content update information. See Package /compare for more information.

Console Extensions for Devkits (Preview)
The Devkit Console Extensions library (Microsoft.Xbox.Tools.ConsoleExtensions) allows you to write an Xbox One app that installs packaged apps (and games), enumerates installed apps and launches installed apps. This library can be used on a Devkit (only on a Devkit) to write a custom app that can be used to install and launch your game when a DevPC is not attached to the console. This initial release is a preview of the library. We will ship a final version in a future XDK.

Note

  You need to install the ADK to use this feature. The final version of console extensions will ship in a future release of the ADK.

Additional developer Storage is now available using a USB drive
USB drives can now be used to provide additional storage in development scenarios. This storage can be used to write log files or any other data specific to development in a place that doesn’t impact hard drive performance. For more information, see Accessing Additional Storage for Development Scenarios.

New XTF APIs
We’ve added the following new XTF APIs:

Linker Performance Improvements
  The Xbox One Linker now supports incremental linking when code in a static library has been updated. Previously, the linker automatically performed a full link in this case. If your title contains several static libraries, this feature will dramatically reduce your build times by increasing the number of times your title will be linked incrementally.

Graphics

All Graphics Improvements Will Come in an Optional QFE for July
All August graphics and PIX changes will be made available in an optional QFE for the July XDK. This is beneficial for titles currently using the July XDK that want August graphics performance or features but don’t want to incur the risk in non-graphics area of updating to the full August XDK.

GPU Performance In General Has Improved by 1.3%
Overall GPU performance for typical game workloads has improved from July to August by an average of 1.3% across titles as measurable in PIX. The amount of performance depends on the game workload, so your measured performance may be more or less. This improvement was made through the following:

GPU DDR3 Bandwidth Has Improved by 1.5%
Overall DDR3 bandwidth available to the GPU has improved by 1.5% by tuning system bandwidth consumers. This change is in the recovery and not in the XDK libraries and so will benefit every XDK version. The eliminated bandwidth caused uneven bursts at 30 Hz and would have affected 60 fps titles disproportionately. The improvement will be seen in-game but not in PIX capture analysis. Even if your title stays on the July XDK and doesn’t pick up the optional QFE, you will get this benefit by simply testing with the August recovery.

Fast Semantics CPU Performance Has Improved
Numerous improvements have been made for when fast semantics are enabled through D3D11_CREATE_DEFERRED_CONTEXT_FAST_SEMANTICS and D3D11_CREATE_DEVICE_IMMEDIATE_CONTEXT_FAST_SEMANTICS. Additionally, a new compile-time flag, D3DCOMPILE_NO_DEBUG_AND_ALL_FAST_SEMANTICS, has been added to improve performance when a title is compiled for release.

For example, consider the following sequence:

IASetIndexBuffer()
IASetPrimitiveTopology()
PSSetShader()
VSSetShader()
IASetInputLayout()
DrawIndexedInstanced()  

This takes 53.34 ns of CPU time on a deferred context when using fast semantics with the new compile-time flag and the fast-path can be used (this is equivalent to 18.75 million iterations per second from a single thread). This is 2x faster than it was with the July XDK. In contrast, with default legacy semantics this takes 349 ns (i.e., legacy semantics are 6.5x slower than fast semantics for this case). Included in the cost for both is the overhead of instructing the Constant Engine to gather and prefetch 24 descriptors, and to prefetch the new shaders. Legacy semantics will be deprecated in favor of fast semantics in a future XDK for 2015 titles. Use GetDriverStatistics to determine when and why D3D cannot use the fast path.

Draw*Indirect Performance is Significantly Better
CPU and GPU performance for DrawInstancedIndirect and DrawIndexedInstancedIndirect is improved, both for fast and legacy semantics. These APIs are more optimized and now support the VS/PS pipeline fast-path. For example, DrawIndexedInstancedIndirect now takes 30.6 ns of CPU time on a deferred context when using fast-semantics and the fast path can be used (this is equivalent to 32.7 million iterations per second from a single thread). This is 8.3x faster than it was with the July XDK.

SetFastResources is Faster
The SetFastResources API was already running at memory bandwidth of the CPU writes to the command buffer so we have improved performance by halving the size of the hardware packet header that must be written by the CPU. In combination with the D3DCOMPILE_NO_DEBUG compile-time flag, this allows a call such as SetFastResources(pConstantBuffer) to now execute in 3.2 ns. We recommend that all resource setting be done through the SetFastResources API.

Asynchronous Compute Can Now Be Much Faster
SetDispatchFlags had a bug that caused the L1’s of every CPU (including those doing other concurrent rendering or compute tasks) to be invalidated on every Async Compute Dispatch call, regardless of the parameters given to SetDispatchFlags. Now, SetDispatchFlags properly works and can be used to disable this automatic L1 invalidation, resulting in significantly improved performance of both the Asynchronous Compute dispatch and any concurrent rendering. It is the title’s responsibility in this case to use synchronization APIs such as ID3D11ComputeContextX::FlushGpuCachesBottomOfPipe, ID3D11ComputeContextX::FlushGpuCachesTopOfPipe and ID3D11ComputeContextX::GPUSendPipelinedEvent to ensure proper coherency.

“Re-Z” Can Now Be Forced To Work
Some rendering passes may benefit from RE_Z order in the pixel shader. RE_Z is when a depth test is performed before and after the pixel shader is run. It shows benefit on foliage, grass, alpha-tested billboard geometry, especially when writing into a fat GBuffer or if the pixel shader is sufficiently long (greater than 1500 clock cycles).

Prior to August XDK it was possible to ask the GPU to use RE_Z by employing the __XBOX_PS_USE_RE_Z #define. However, this wouldn’t have any effect in some cases because the GPU is allowed to ignore that setting. Most of the time the GPU would choose to do Late-Z instead.

The following shader #defines are added for August to enforce one of the four available modes on the shader:

__XBOX_FORCE_PS_ZORDER_LATE_Z
__XBOX_FORCE_PS_ZORDER_EARLY_Z_THEN_LATE_Z
__XBOX_FORCE_PS_ZORDER_RE_Z
__XBOX_FORCE_PS_ZORDER_EARLY_Z_THEN_RE_Z  

The SetPixelShaderDepthForceZOrder API was added to enforce the shader setting.

Note

  this API forces Z-order mode without regard for correct culling of UAV writes.

Occlusion Query Has More Functionality And Can Now Write to Buffers
Query support has been extended to provide direct query result write-backs to ID3D11Buffer resources. The WriteQuery API may be used to sample and write event, timestamp, occlusion, pipeline statistics, and stream output statistics query results to a given resource. The ConfigureQuery and ResetQuery APIs may be used to customize occlusion queries to be performed and to reset counter values. The addition of these APIs allow query results to be directly referenced by subsequent GPU processing without the need for intermediate CPU parsing. This can be especially useful in allowing a query to be invoked and acted upon within the same command list.

Support for HTile Resummarize
During rendering with depth, Hi-Z information in the HTile buffer is being constantly automatically reconstructed. This process is called HTile resummarize. However, the resummarize process has low priority during normal rendering, and often Hi-Z information is not tightly bound by the written depth pixels. Hi-Z will never be incorrect, but Hi-Z culling efficiency may be reduced. By using D3D11X_DECOMPRESS_RESUMMARIZE_HTILE with a Decompress function on your depth buffer, the Hi-Z information can be reconstructed. It costs 60us for a 1080p DSV but may save time in the long run.

New method ID3D11DeviceContextX::SetShaderUserData()
The ID3D11DeviceContextX::SetShaderUserData() API has been added to complement the existing VS/HS/DS/GS/PSSetShaderUserData family of APIs that were added in July. This new API allows you to set shader user data registers by hardware shader stage. This functionality is available with a new method ID3D11DeviceContextX::SetShaderUserData, which uses a new enum D3D11X_HW_STAGE and additions to an existing enum D3D11X_MULTI_DRAW_FLAG.

Draw ID extended to any shader stage
The Draw ID functionality for the Multi Draw family of APIs has been extended to allow sending the Draw ID to any shader stage, not just the Vertex Shader. Now the Hull, Domain, Geometry, and Pixel shaders can directly access the Draw ID without the need for you to pass it through an interpolator.

New shader compiler intrinsics available
The following new shader compiler intrinsics have been added:

uint<>    __XB_PackF32ToI16       (in float<> x, in float<> y);
uint<>    __XB_PackF32ToU16       (in float<> x, in float<> y);
int<>     __XB_F32ToI32RPI        (in float<> val);
int<>     __XB_F32ToI32FLR        (in float<> val);
float<>   __XB_I4ToF32            (in int<> x);
$type1    __XB_WriteLane          (in numeric32_only value, in int lane, in $type1 val);
$type1    __XB_LaneSwizzle        (in numeric32_only value, in uint offset10);
uint      __XB_GetLaneID          ();
uint      __XB_GetCUID            ();
uint      __XB_GetWaveID          ();
uint      __XB_GetSIMDID          ();
uint      __XB_GetSEID            ();  

Complete descriptions of these intrinsics are available at Shaders and the FXC Shader Compiler.

Xbox Hang Investigation Tool (XHIT) Improvements
XHIT now copies the last generated XHIT file to the D: drive on devkits, as well as the original location on the T: drive. The location on the D: drive does not have a unique file name, so only the last XHIT file will be present on the D: drive with name “gpuhang-latest.xhit”. For more information, see Xbox Hang Investigation Tool (XHIT).

Input

Titles can now control when controller input processing happens
We have introduced an alternate method for titles to drive Xbox One controller input. Calling SetManualControllerUpdate(TRUE) will enable the new controller input method which turns off the background threads that automatically update Xbox One controller input. Once enabled, titles must manually update controller input by calling UpdateControllers(). GetManualControllerUpdate() can be called to determine if the default or new alternate controller input is being used. Titles still use the existing Gamepad and related controller APIs to read the state of input devices.

As the background threads that automatically update controller input (the default behavior) run on cores 4 and 5, this alternate method can be used for titles wanting more control over the updating of controller input, including which cores to execute input processing.

Note

  This new alternative method is opt-in, unless you explicitly use this method, the default behavior remains unchanged.

Keyboard Support for Exclusive App in Retail
Exclusive apps now have keyboard support. The following APIs are now available:

PIX

Continuous A/V Capture (Preview)
Continuous A/V capture is a popular feature from PIX for Xbox 360 that allows developers to record an audio/video clip of output while PIX monitors the game title. In conjunction with continuous timing captures, this can be a powerful aid to post-mortem investigation of visual and performance glitches during large-scale lab testing. In contrast to Xbox 360, the Xbox One version of this feature is always on, leveraging the GameDVR service of the console to continuously record up to sixty seconds of historical audio and video. Captured streams can be viewed as thumbnails within the Console view on a frame-by-frame basis.

CPU captures have been enhanced to help identify transient performance spikes in titles
Identifying those functions that occasionally perform outside of their normal characteristics can be one of the most challenging aspects of tuning your title for optimal CPU performance. It’s often the functions that exhibit these transient performance spikes that cause glitches while your title is running. CPU captures have been enhanced to help you find functions that have occasional outliers in performance. Callgraphs can then be requested for the outliers to help you determine why the transient spike is occurring in your title.

Pixel History
Pixel History allows you to trace the history of all draw-level events that affected a given pixel of a render target. This is particularly useful for debugging unexpected results in a given render target, and is a precursor for shader debugging features that will appear in future releases. Pixel History is available as a new pane within the Resources view and PIX highlights appropriate draw events within the Events view as they are selected within the Pixel History pane.

Shader Profiling: Shader Instruction Trace
Shader Profiling in PIX has been greatly expanded with a new Shader Instruction Trace view that combines a new wave-front visualization with a table of traced instructions. The new visualization pane show waves for an identified draw as they flow through the SIMD units on the GPU. The instruction trace pane lists instructions for the shaders in flight for a given draw, with columns including per-instruction average and exact costs, percentage of waves stalled, and percentage of waves visited. As instructions are selected in either pane, they are highlighted in the other to show correspondence between the trace and the visualization. Altogether, this feature will give you deep insight into the hardware behavior of your shader code and will quickly become invaluable in optimizing shaders for Xbox One.

Additionally, performance of the initial shader profiling passes has been improved significantly since the past release.

Top L1 and L2 cache miss offenders now displayed in instruction traces
The set of functions that cause the greatest number of cache misses is now displayed in CPU instruction traces. This list of functions allows you to more quickly identify the places in your title that are causing the most cache misses.

Shader disassembly colorization
Shader GPU instruction views have been enhanced with colorization for improved readability.

Network counters in System Monitor
The System Monitor graph in the Console view has added Title Network counters to help with performance monitoring of network utilization over time.

SmartGlass

Introducing Record That API
SmartGlass now supports “Record That” API which allows users to record game clips using SmartGlass. Sample usage:

Windows:SGPlatform.GameDvr.RecordPrevious(60);
Android:SGPlatform.getGameDvr().recordPrevious(60);
iOS:[ [XsgPlatform gameDvr] recordPrevious:60];  

New properties and methods for token objects
Token objects now contain the following properties and methods:

AgeGroup
AgeGroup has the following values:

gamertag
The user’s gamertag.

getAuthorizationHeaderforRequest
Retrieves the Auth Header from the token.

New Token Manager API: GetXboxLiveToken
SmartGlass is introducing a new Token Manager API called GetXboxLiveToken which gets token for AudienceURI=http://xboxlive.com.

Open shortcuts to the Log Viewer are easier to access
We’ve added easy to use Open shortcuts to the Log Viewer to open local log files for the SmartGlass App as well as SmartGlass Studio.

New Native Sample
We have made available a new WinStore 8.0 XAML Native SDK sample.

System

Home Console
The Home console is no longer automatically set when you add a user account to a console. This clears any existing state and prevents issues around sharing Gold permissions and content licenses.

Application-specific Device ID
Games and applications can use the new Console.ApplicationSpecificDeviceId property to get a unique value from the console that is specific to caller’s title ID.