Goal: tell the user what the app does on the GPU and whether there is an obvious win.
- Open each shader in the sidebar's GPU section. For every kernel, read its AIR and its "Loaded by" line, which names the CPU function that loads it by name.
- For a kernel that runs often, look at what it reads: a blur or convolution that reads each pixel several times from a texture is a common cost, and reading once into threadgroup memory is the usual fix.
- If there is a recording, open it and read the timeline, or call
gpu_profile(eleven). Note the frame time, how busy the GPU is, and the gaps between frames.- GPU busy near 100%: the kernels are the cost. Point at the one doing the most memory traffic.
- GPU idle between frames while the app waits on each one: the app serializes frames. Keeping two or three frames in flight is the fix.
- A slow first frame: pipeline setup. Building pipelines at launch, or shipping a binary archive, fixes it.
- If there is no recording yet, tell the user to press Record a GPU run in the sidebar.
Report in plain words: what the shaders do, which CPU code drives them, and the single most useful change, with the number from the recording that backs it up.