forked from TrustNo1/Darner
[pr-performance][memory] card steps: read sources in place in card memory (DARNER_CARD_STEPS_IN_PLACE=1, off by default) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "theforgotten669/Darner:rebar-card-steps-in-place"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contributor role (optional)
What it changes
Roadmap open problem 2 (
docs/roadmap-plan.md): about 350 pool fills a frame still went throughrebar_pool::read_via_card(about 3 ms of round trips). The title copy they were taken along with had a source in place, andholder()refused every copy in place.New switch
DARNER_CARD_STEPS_IN_PLACE=1, off by default. With it off, the only change is the refusal text on the frame line.holder()lets a copy in place serve as a source when its placed buffer is in the graphics heap's twin. Our list reads the placed buffer.Src::Pool), whatever its destination. Before, that only happened for fills and for copies into a pool. This bullet goes beyond the twin fix and can be dropped on its own if you'd rather.host.rs, sender and submitting thread) callheap_twin::syncbeforeExecuteCommandLists, our list included. Steps of ours that write title memory force that sync (heap_twin::ours,wrote_through).fills_in_pools).heap_twinrisk 2): a 4 KiB sync can land over bytes a flight in the air writes. The card step then reads whichever write wins.How it was tested
e562db6cargo test -p darner-gpu --lib --locked -- host::card_steps::tests::copies_in_place host::card_steps::tests::what_no_host host::card_steps::tests::flight_texture: 3 passed. One of them is new (copies_in_place_serve_only_as_twin_sources_when_asked).cargo xtask policy --staged: 4 files ok.cargo clippy -p darner-gpu --all-targets --locked -- -D warnings: fails with 15 errors, none on a line this change touches (rebar_pool.rs,memprobe_rebar.rs,indirect/mesh_bench.rs,touch_audit.rs,poolcensus/reads.rs,draw.rs,card_steps.rs:2304). Not run on the base commit.DARNER_REBAR_POOLS=1(andDARNER_HEAP_TWIN=1), with the switch on and off. Compare theread_via_cardround trips, the pool fills taken, and the refusal reasons. Then a picture check.darner-gpusuite, CI gates 2 and 3 not run, no diagnostics build.Checklist
main. (It's based onrebar, as the roadmap asks.)docs/asset-policy.md.rebaratfae95b1)Checked for overlap
🤖 Generated with Claude Code
Hi theforgotten669, are you already planning coverage for
Takeninpool_copy_read? Would a small game-free extension to your existing test be useful for #1? Using generated ranges and the real ownership map, it would check four cases:Takenis skipped when it’s the only overlap.I’d keep the proposal to those assertions on #1. The ReBAR base in #561 can stay separate.