PIX on Windows version 2008.26 added support for taking GPU Captures of applications that use D3D video APIs. This means that you can now use PIX to capture regions of GPU work that involve videos, such as title screens in games or videos playing in web browsers. In this blog post, we’ll talk about how PIX captures video workloads and what is and isn’t supported.
PIX on Windows supports taking GPU Captures of applications that use D3D12 video APIs.
D3D11 video work can be captured by using the “Force D3D11On12” option in PIX.
PIX does not support capturing applications that use video DRM. Please turn off DRM before trying to take a PIX capture.
PIX does not capture and replay D3D12 video work directly. Instead, PIX will notice any modifications to D3D12 resources that are made by “decode” or “process” video APIs at capture time, and PIX will make equivalent modifications to the resources during replay.
Here is a screenshot from a multi-frame GPU Capture of Microsoft Edge playing a video. This was captured using D3D11On12, but the workflow in PIX would be the same if we captured an application that used D3D12 video APIs directly.
The above screenshot is for Global ID 72, which is the first Present() in the capture file. If we select an event later in the capture, then we can see the contents of the video change:
If we select a Draw() call that renders the video’s contents onto the backbuffer, then we can see the individual planes of the NV12 video texture that are sampled by the Pixel Shader:
As described in the Summary section, PIX doesn’t capture/replay the video API calls made by the application. Instead, PIX notices when D3D12 resources are modified by video APIs at capture time, and PIX will make the equivalent modifications at replay time. These modifications are shown as “UpdateResourceAfterVideoWork” events in the CPU Timeline:
All other PIX features, such as Shader Debugging and Pixel History, should work as expected. Performance analysis features, such as Collect Timing Data, should also work but they will not include performance data for D3D12 video work.