PIX on Windows

Performance tuning and debugging for DirectX 12 games on Windows

DirectX Raytracing

PIX on Windows includes support for the final DirectX Raytracing (DXR) that’s part of the Windows 10 October 2018 Update (a.k.a. “RS5”). This allows you to debug your raytracing code by capturing and analyzing your DXR applications with the same tools that you would use to capture and analyze your other D3D12 applications.


Getting Started



Once you are set up, you can launch and take a GPU Capture of your DXR application. You can begin analyzing your capture by opening it and examining your DXR API calls in your event list:



After starting analysis, you can select your DispatchRays calls and see the resources it used by looking at the “Pipeline” view in the “Pipeline” tab:


Clicking on an entry in the ‘Shader Tables’ group on the left-hand side will show how the GPU will interpret the selected shader table:

Each remaining ‘group’ within this list (e.g. ‘RayGenMain’) lists the resources used by a particular shader record within one of the shader tables. Its bolded title, such as “MyHitGroup (Record 0)”, shows the shader record’s export name within your state object together with the shader record’s index within its shader table (if applicable). Any shader record that uses resources, including your Ray Generation shader record and/or entries in your Hit Group, Miss Shader, or Callable Shader shader tables, will be displayed in this list. For each shader record, PIX lists the resources bound to its shader, including all resources bound via global and/or local root arguments.

For each resource bound to a shader, you can click on the resource to view it in the same way that you would view resources for rasterization or compute shaders. You can also visualize the raytracing acceleration structures bound to your raytracing shaders:


(screenshot courtesy of Nir Benty and NVIDIA’s Falcor)

Note that PIX visualizes acceleration structures after they are built by reading data back from the GPU. This means that the visualization will include any optimizations added by the driver during the build process, such as combined geometry.

The “API Object Table” can be used to view your DXR API objects, such as your state objects, together with any other D3D12 API objects that were used in your capture. In particular, you can view the subobjects that make up your state objects in an easy-to-understand format:



Known Issues and Restrictions

There are some additional restrictions on DXR API usage that your application must follow before you can take a GPU Capture of it. The restrictions are:

  • Your acceleration structures must be stored in committed or placed resources

Furthermore, some features in PIX show incomplete or incorrect data for GPU Captures that use DXR. These features will support DXR in a future release of PIX on Windows. These features include:

  • Dr. PIX
  • Shader Debugging

For applications using the DXR Fallback Layer, both GPU Captures and Timing Captures will capture the compute work generated by the Fallback Layer as seen by the D3D12 runtime.