diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 16:32:41 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 16:32:41 -0500 |
| commit | 68827f4742210a8c08609f7fcc6cad4dc245c303 (patch) | |
| tree | 956541b289545dcb5ed5ae234f24ba84e7a14518 /runtime/xma_decoder/tests/ffi_cpp_smoke.cpp | |
| parent | 8cc5193ec10f56861c0b92d6d0c66bc9bc8c1c86 (diff) | |
Title memory by address: a page given its place at a submission remembers when it was taken (LEONIDA_PLACE_TAKEN=0: as before)
What was wrong: `Memory::place` gives a page of a packed structure the
builder came to its place in an arena at the list's submission and sends
its bytes up (`take`), but left the page's `taken` at 0, "never". The next
`Memory::bring` of that page therefore found it stale whatever the write
watch said, took all of title memory's bytes and sent the whole page up
again (`merge` with `never`, `resend`), over what the builder had made of
them on the card meanwhile: a structure unpacked there went back to its
packed bytes, built nodes sharing the page to the title's.
What changes: `place` asks the write watch for the page before the bytes go
up (`watch::writes`, as `bring` does; from the journal if the submission
asked ahead for it) and keeps that asking's number as the page's `taken`.
A later `bring` then takes only what the title wrote since, a dword at a
time, and resends nothing whole. What the title writes between the asking
and the copy is in the copy and is found written again by the next asking:
taken twice, lost never.
Where it applies: `place` is reached only from `land`, which only a builder
dispatch defers (`LEONIDA_BVH_BUILDER=1`, the launcher's -RayTracing). With
ray tracing off, as the launcher starts the title by default, nothing
changes. It costs one asking for each page placed, on the thread that
submits.
LEONIDA_PLACE_TAKEN: on unless 0.
From TaynanGT/Vice-Tay a33271f ("Remember write-watch stamps for placed GPU
pages (#342)", co-authored there by urielbeaupre), GPL-3.0: the same lines,
for the same function, which this tree has unchanged.
No test of its own: it needs an arena on the card, title memory under the
write watch and a builder's page. Checked: `cargo check --profile diag -p
leonida --features diagnostics,mimalloc` (the 10 warnings of leonida-gpu from
before); `memory::tests` (2 passed). Not run in the game, and not with ray
tracing on.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder/tests/ffi_cpp_smoke.cpp')
0 files changed, 0 insertions, 0 deletions