Skip to content

Latest commit

 

History

History
117 lines (73 loc) · 4.77 KB

capture.md

File metadata and controls

117 lines (73 loc) · 4.77 KB

Capture

Overview . Inspect . Record

Introduction

Capture all rendering commands used to render a frame, letting you inspect each command, as well as providing information about the rendering state at each command. It also captures the image results of each render pass.

Note

Your rendering loop needs be using requestAnimationFrame for Capture to work, as Capture uses that to identify what commands to capture for a frame.

Capture

Capturing Frame Data

Press the Capture button to capture a frame from the page.

Capture Button

Max Buffer Size

The Max Buffer Size value specifies the maximum buffer size Capture will record, for Uniform and Storage buffers. Sending buffer data to the DevTools panel can be slow, so limiting the buffer size can help capture performance. Large buffers are typically used for storage buffers.

Frame Commands

Capture will record all GPU commands issued during a frame, including their arguments, and the stackrace of where it was called.

Selecting a command will display information about the command, including associated GPU objects.

Render Pass Textures

The color texture attachments of Render Passes will be captured and displayed in the capture panel.

Selecting a Render Pass image will select the associated beginRenderPass command.

Capture Render passes

Command Stacktrace

Each command will record the stacktrace of where it was executed.

Command Stacktrace

Command Inspection

Selecting a command will display information about the command, including its arguments and information about objects related to the command.

Command Inspection

Uniform and Storage Buffer Inspection

If you select a Draw or Dispatch command, it will inspect the BindGroups and Pipeline active for the command. It will inspect the Buffer objects associated with the BindGroups, and parse their data based on the shaders associated the the Pipeline. This lets you inspect buffer data as the shader will see it during the Draw or Dispatch command.

Affected By lists the commands that have written to this particular buffer.

Format lets you customize the format of the buffer data. See Formatting Buffer Data for more information.

Array Data

Array data can be quite large. To improve performance and readability, if the array has more than 100 elements, only a subset of array data is viewed.

Offset is the starting index of the array to view.

Count is the number of elements of the array to view.

Vertex Buffer Data

If you select a Draw command, it will inspect any Vertex Buffers bound for the draw call. It will parse the data from the RenderPipeline descriptor, and the shader, to present the data as the shader will see it.

Debug Groups

If the page pushes/pops Debug Groups, they will be be used to group commands in the capture. This is useful for organizing rendering commands to make it easier to identify what the commands are contributing to the render.

Frame Stats

The Capture tool can provide various statistics about the capture. Press the Frame Stats to show the capture statistics. These include how many graphics commands were called; how many draw calls; and so on.