PIX DirectX Frame Analysis Rendering Metrics
Microsoft PIX on Windows allows developers to capture, profile, and optimize DirectX 12 rendering workloads by inspecting detailed performance data across CPU and GPU boundaries. Performing a GPU capture in PIX enables developers to inspect critical metrics—including draw and dispatch timings, hardware pipeline statistics, resource memory usage, execution occupancy, and vendor-specific performance counters. This guide provides an overview of the primary rendering metrics exposed during a PIX frame analysis and how they reveal rendering bottlenecks.
GPU Execution Time and Timing Metrics
Execution timing forms the foundation of frame analysis in PIX. Developers can measure the cost of specific API calls and pipeline stages:
- Frame and Pass Duration: Measures the total elapsed
GPU time for an entire frame, individual render passes, or custom
user-defined markers
(
PIXBeginEvent/PIXEndEvent). - Per-Draw and Per-Dispatch Timing: Pinpoints the
exact duration that individual
DrawInstanced,DrawIndexedInstanced, andDispatchcalls occupy on the GPU timeline. - GPU Clocks and Timestamps: Provides raw cycle counts and timestamps for command queue executions across Direct, Compute, and Copy queues, exposing inter-queue dependencies and synchronization overhead.
Pipeline Statistics
PIX captures standard Direct3D pipeline statistics counters, which help detect geometry bottlenecks and wasted rasterization work:
- Input Assembler Metrics: Tracks total vertex and index read counts, along with the number of primitives submitted.
- Shader Stage Invocations: Reports the invocation counts for Vertex (VS), Hull (HS), Domain (DS), Geometry (GS), Pixel (PS), Amplification (AS), Mesh (MS), and Compute (CS) shaders.
- Rasterizer and Primitive Clipping: Quantifies how many primitives were processed, clipped, or culled before reaching the pixel shader stage.
- Pixel and Depth Operations: Measures total fragments processed by pixel shaders versus actual pixels written, identifying depth/stencil rejection rates and potential overdraw.
GPU Hardware Vendor Counters
PIX integrates vendor plugins from AMD, Intel, and NVIDIA to surface microarchitecture-specific performance counters:
- Memory and Cache Bandwidth: Measures read/write traffic across L1 caches, L2 caches, and high-bandwidth VRAM, detailing cache hit/miss rates.
- Texture Unit Utilization: Highlights texture sampler latency, filtering utilization, and memory stalls resulting from uncompressed or poorly filtered textures.
- ALU and Execution Unit Utilization: Evaluates whether shaders are compute-bound or memory-bound by monitoring arithmetic logic unit (ALU) active cycles versus stall cycles.
- Wave/Warp Occupancy: Tracks the percentage of active execution threads running in parallel relative to the hardware’s theoretical maximum.
Resource Usage and API Call Metrics
In addition to timing and hardware counters, PIX aggregates high-level metrics regarding resource lifecycle and API interactions:
- Workload Volume: Aggregates the total number of draw calls, dispatches, ray-tracing traces, and resource barriers within the frame.
- State Change Frequency: Flags costly state thrashing, such as excessive Pipeline State Object (PSO) switches, root signature bindings, or Render Target View (RTV) swaps.
- VRAM Allocation and Residency: Inspects buffer, texture, and acceleration structure footprints to detect memory exhaustion and paging events.