Repository navigation
Give each GPU pass of a profile to the frame that submitted it, where it ran - #10
Conversation
|
Needs more testing as a user before merging. The tests and the sessions listed in the description cover the engine side only. My lead and I will adapt it as needed, and tomorrow I will test it with a separate agent acting as a Mirai user. |
|
Review: merge after fixes. Current
|
A host frame can submit more than once (a capture, a thumbnail, a UI texture besides the window), and the renderer kept only the timings of the last submission the GPU finished: a recorded frame lost the passes of its other submissions and was still counted as measured. - rhi.frame_timings also returns the rhi frame those timings measured (Vulkan and Metal), and whether the slot had submitted one. - render copies the timings of every submission into a list (renderer_gpu_submissions) that the host takes and clears each frame. - host gives each submission to the recorded frame whose range of rhi frames holds it. A frame is measured once all of its submissions came back; a recording runs up to PROFILE_GPU_LATE frames past its last one, keeping no zones, until they do. Passes keep where they ran, on the clock of the zones. - editor: the result structs of main gain gpu_measured, gpu_frames and the start_ms of a pass; GPU numbers leave out unmeasured frames. profile.export writes a GPU thread. The profiler panel draws passes where they ran and says when a frame was not measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3603803 to
5811c8d
Compare
|
Rebuilt on
Not tested:
|
|
Follow-up: a live run of the "Not tested" item. Run on all six PRs merged onto
|
|
Follow-up: Setup:
How I read it:
|
… ones a failed begin collected - rhi: a slot with no query pool, or whose times the device could not read, is not measured (Vulkan and Metal), instead of measured with no passes. - render keeps the timings a frame_begin collected before it failed, once per rhi frame. - host waits for the GPU times of any recorded frame still missing them, not only of the last one. - The GPU test of the profile has its own file, so --no-gpu runs the others. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Closes #5.
Rebuilt on
main8c5a2a6 after the review; the comment below answers it point by point.Changes
Give each GPU pass of a profile to the frame that submitted it
A host frame can submit more than once (a capture, a thumbnail, a UI
texture besides the window), and the renderer kept only the timings of
the last submission the GPU finished: a recorded frame lost the passes of
its other submissions and was still counted as measured.
(Vulkan and Metal), and whether the slot had submitted one.
(renderer_gpu_submissions) that the host takes and clears each frame.
frames holds it. A frame is measured once all of its submissions came
back; a recording runs up to PROFILE_GPU_LATE frames past its last one,
keeping no zones, until they do. Passes keep where they ran, on the
clock of the zones.
the start_ms of a pass; GPU numbers leave out unmeasured frames.
profile.export writes a GPU thread. The profiler panel draws passes
where they ran and says when a frame was not measured.
Merge order
Merge first of the profiler chain: #10, then #12, then #13. All six PRs were merged together onto
mainwith no conflict, and the steps ofchecks.ymlpass on that tree (mirai checkon 135 packages, 18 test suites without a GPU).Not tested
bench compare --base mainon this machine. A coldmaindoes not open its API on 4 cores and 16 GB without ray query: it compiles the software tracer before the API, and its private memory reaches 25 GB. Details are in Compile the software ray tracing pipelines after the editor opens, and let no frame wait for them #15.🤖 Generated with Claude Code