read_buffer
Read live GPU buffer contents directly from a connected page, decoding bytes as uint8, float32, or other types, without needing a full capture.
Instructions
Read the current contents of a live GPU buffer on a connected page, without taking a full capture. The inspector copies the buffer to a readback buffer, maps it, and returns the bytes decoded as the requested type. The source buffer must have been created with COPY_SRC usage (buffers created while a capture is armed are given COPY_SRC).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Number of bytes to read (default: to end of buffer, capped). | |
| type | No | How to decode the returned bytes (default float32). | |
| offset | No | Byte offset to start reading at (default 0). | |
| pageId | No | Page to read from. Optional when exactly one page is connected. | |
| bufferId | Yes | Numeric id of the GPU Buffer object to read. |