Repository navigation
Compile the software ray tracing pipelines after the editor opens, and let no frame wait for them - #15
Compile the software ray tracing pipelines after the editor opens, and let no frame wait for them#155hif7y wants to merge 5 commits into
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: rework. This PR builds on code that
Findings on the branch:
|
|
Rebuilt on Approach.
Also fixed: surface overlays were never queued, so with Measured on an RX 580, cold:
Not tested:
|
|
Follow-up: a freeze found by a live run, fixed in f09a580. What happened. I opened the editor of all six PRs merged onto
The fix (+11/−2):
Verified:
A separate finding, not caused by this PR. On this machine (amdvlk, RX 580, 16 GB), one variant of the software tracer's
|
|
The |
|
Review of the rebuilt branch: not ready yet, but close. The approach is now the right one, and most of the first review is solved. What is left is how frames wait. Checked and correct
What blocks the merge
A simpler shape that fixes 1 and 2
For 4, keep the refusal as a state the capture can read, so a capture of a world that cannot be drawn fails with that message. |
Renderer_Desc.tracer_later (the editor's, never a game's) starts the renderer without the stages of rays traced by software: tracer_settle asks for them on the existing pipeline thread with pipeline_make(early) through pipeline_variants_ask, which now asks for the stages of a tracer without constants too. Until they are in place the frame draws no world and Stats.problem names the stage; a renderer without pipeline_thread waits for it. A refused stage becomes Refused and is reported once, so nothing waits on it. The pipelines of a stage of one tracer are kept as variants, so the skin and TLAS-batch stages go through pipeline_of. Captures (capture without ui, play.capture, recordings and the editor's --capture) wait for every pipeline asked, early ones too, before their settling frames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A capture that waited for every pipeline asked ahead of time compiled all the variants of both kinds of shadows before its first frame: on a cold driver cache it still waited after an hour. Instead a frame no window shows (Frame_Desc.offscreen: capture, play.capture, recordings) waits, as one of a renderer without pipeline_thread does, for each stage it draws with, so its settling frames run with them and nothing else. The editor's --capture waits for what its frames asked for. The pipelines of surface overlays were kept apart from the variants, so with tracer_later nothing asked for the software ones and the world was never drawn. Each blend is now a Pipeline_Id whose tracers are variants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A frame no window shows promoted a program stage asked ahead of time but drew its materials as their rows. It now waits for the queued job, as it does for the stages of the renderer, without making it a second time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…river A scene thumbnail is taken with app_capture_world, whose offscreen frames wait for every stage they draw with. With tracer_later, the editor opened on a scene whose stage of the tracer was still being made, and the thumbnail of that scene waited for the driver on the thread of the UI: with a stage that takes long to make, the window and the API stopped answering until it was made. renderer_frame_partial says whether the last frame drew without a stage it asked for (a pass skipped while its pipeline is made, or no world while a stage of the tracer is missing). The thumbnail of a scene waits for a frame of the window that drew whole, and captures still wait for what they draw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A frame no window shows no longer waits for the stages it draws with: on the thread of the UI that froze the editor (a .particle preview, a scene thumbnail) while the software tracer was made. What reads a frame back draws again while renderer_frame_partial, which now also sees the pipelines frames asked for and the program stages drawn as their rows, says one is being made, within the wait it already had: app_capture_world, recordings, the window of a capture with ui. A frame still partial then, or one without a stage the device refused, fails the capture with the problem the frames give, instead of an image without the world. The stage pipelines of extensions are made on the pipeline thread too: the first .particle on a cold driver cache no longer stops the window. The scene tab shows the dot of what works while the viewport draws without a stage being made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reworked the way you proposed. 9b8b3c3 on top of the previous commits, rebased onto
Tests. Each fails without its fix.
Live on the RX 580, windowed, opened directly on
Not done:
|
Closes #7.
Rebuilt on
mainb33d9a2 after the second review. The comment below answers it point by point.Changes
render: the editor opens before the software tracer is compiled
Renderer_Desc.tracer_later (the editor's, never a game's) starts the
renderer without the stages of rays traced by software: tracer_settle
asks for them on the existing pipeline thread with pipeline_make(early)
through pipeline_variants_ask, which now asks for the stages of a tracer
without constants too. Until they are in place the frame draws no world
and Stats.problem names the stage; a renderer without pipeline_thread
waits for it. A refused stage becomes Refused and is reported once, so
nothing waits on it. The pipelines of a stage of one tracer are kept as
variants, so the skin and TLAS-batch stages go through pipeline_of.
Captures (capture without ui, play.capture, recordings and the editor's
--capture) wait for every pipeline asked, early ones too, before their
settling frames.
render: captures wait for what they draw; overlays are variants
A capture that waited for every pipeline asked ahead of time compiled
all the variants of both kinds of shadows before its first frame: on a
cold driver cache it still waited after an hour. Instead a frame no
window shows (Frame_Desc.offscreen: capture, play.capture, recordings)
waits, as one of a renderer without pipeline_thread does, for each stage
it draws with, so its settling frames run with them and nothing else.
The editor's --capture waits for what its frames asked for.
The pipelines of surface overlays were kept apart from the variants, so
with tracer_later nothing asked for the software ones and the world was
never drawn. Each blend is now a Pipeline_Id whose tracers are variants.
render: a frame that waits waits for the program stages it draws
A frame no window shows promoted a program stage asked ahead of time but
drew its materials as their rows. It now waits for the queued job, as it
does for the stages of the renderer, without making it a second time.
editor: a scene thumbnail waits for frames drawn whole, not for the driver
A scene thumbnail is taken with app_capture_world, whose offscreen frames
wait for every stage they draw with. With tracer_later, the editor opened
on a scene whose stage of the tracer was still being made, and the
thumbnail of that scene waited for the driver on the thread of the UI:
with a stage that takes long to make, the window and the API stopped
answering until it was made.
renderer_frame_partial says whether the last frame drew without a stage
it asked for (a pass skipped while its pipeline is made, or no world
while a stage of the tracer is missing). The thumbnail of a scene waits
for a frame of the window that drew whole, and captures still wait for
what they draw.
render: no frame waits for the driver; readers draw again until whole
A frame no window shows no longer waits for the stages it draws with:
on the thread of the UI that froze the editor (a .particle preview, a
scene thumbnail) while the software tracer was made. What reads a frame
back draws again while renderer_frame_partial, which now also sees the
pipelines frames asked for and the program stages drawn as their rows,
says one is being made, within the wait it already had: app_capture_world,
recordings, the window of a capture with ui. A frame still partial then,
or one without a stage the device refused, fails the capture with the
problem the frames give, instead of an image without the world.
The stage pipelines of extensions are made on the pipeline thread too:
the first .particle on a cold driver cache no longer stops the window.
The scene tab shows the dot of what works while the viewport draws
without a stage being made.
Merge order
Independent of the other open PRs: it merges cleanly into
main.Not tested
render check --qualityagainstmain, and the fullrendersuite, which does not finish on this machine onmaineither (A GPU reset that no call reports hangsframe_begin, and with it every later GPU test #85, ADdgi_Tracedispatch runs 30 times its length in the full render suite and resets the GPU #86).tracer_laterdoes not apply there.🤖 Generated with Claude Code