GPU Trace

explicit_gpu_trace_tool.png

DX12GPUTrace.png

Introduction

The GPU Trace allows you to view timing information for GPU commands executed through calls to ID3D12CommandQueue::ExecuteCommandLists. The GPU Trace window can be opened only after connecting to a DX12 application.

Features

More specifically, ID3D12GraphicsCommandList calls submitted with ID3D12CommandQueue::ExecuteCommandLists can be viewed in this trace. It is important to note that not all ID3D12GraphicsCommandList calls are displayed within the GPU Trace window. At the moment, only a subset of API calls are collected:

Usage

To view a DirectX 12 GPU Trace in GPU PerfStudio, first connect to a running DX12 application. Once connected, click the GPU Trace button to collect a trace from the current frame. When the GPU Trace window loads, inspect the trace data by using a combination of the scrollable timeline on the top, and the CommandList tabs with calls on the bottom. For trace timeline navigation details, see the API Trace section.

The timeline shown within the GPU Trace can be thought of as a sampling of command execution on the GPU. CommandLists are built on CPU threads by invoking calls to ID3D12GraphicsCommandList, and then one (or many) CommandLists are submitted to the GPU within a ID3D12CommandQueue during the ExecuteCommandLists call. The results of the GPU Trace intend to show the GPU execution density over time for the current frame. Each command that was executed is given an item in the timeline, where the width of each item corresponds to the total execution duration on the GPU. To find the exact execution duration info for each item in the trace, hovering over each Command in the timeline will open a tooltip including start/end timestamps.

Two-way Integration with API Trace

The GPU Trace can work with the API Trace in "Linked" mode to identify the origin of a command call on the CPU, and the execution results on the GPU.

Note: This feature will only work when using the "Linked" trace mode. Finding related calls in a separate trace tool requires all trace data to be populated from the same original frame, which is what the Linked trace accomplishes. Read more about the Linked Trace here.