gpu(native): drop a command at unmapped title memory alone, not its whole piece #102
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/102"
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T15:25:00Z.
What this changes
Refs #15. In your #100 run the story load still logged 229 "title address … is not in a mapped pool" warnings. Each of them comes from
native/title.rs's "a piece of title work was refused": inNativeHost::execute, a command whoseprepfails that way falls toErr(e) => return Err(e), so the wholeExecuteCommandListspiece is refused. That drops the piece's valid dispatches, copies and value writes too, and the title then reads their destination buffers as they were before. That fits the float-pattern data later read as pointers.Such a command is now dropped by itself, the way #57 drops a draw or dispatch with an unset root parameter or no target:
unmapped_title_address_is_refused, "an error at submission, not a GPU fault").NativeHost::unmapped). Unlike the two #57 kinds, the first one warns without a switch, as the refused piece did, and each one is logged at debug level with its address, so nothing you used for diagnosis is lost.This applies to every command kind that resolves title memory in
prep: root views of draws and dispatches, vertex and index buffers, copies, and fills and value writes. Other errors still refuse the piece. On the console that memory is reachable, so running the rest of the piece is closer to it than dropping everything; the dropped command itself is lost either way.It doesn't fix why those addresses are outside the pool table. #100 covers the upload blocks; the other candidates I found (host-heap
XMemAllocDefault/ID3D12Heapmemory, fence GPU addresses, ranges spanning two pools) need a run with the addresses to rank, and I'll follow up there.How it was tested
victory-gpuon arm64 with the Metal Shader Converter (166 tests, the native tests 3 times):unmapped_title_address_is_refusedbecomesa_command_at_unmapped_title_memory_is_dropped_alone. On Metal, a dispatch and a copy at unmapped memory are dropped (unmapped() == 2, the copy's destination untouched), and the value writes before and after them and the valid dispatch between them run. Withmain'sexecuteit fails: the piece is refused with "title address 0xdead0000+0x1 is not in a mapped pool".cargo test --workspace(684 tests)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings, also with--all-featurescargo xtask policyChecklist
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T15:55:36Z.
Review: DISMISSED
Dropping the one command at unmapped title memory, rather than refusing the whole ExecuteCommandLists piece, matches how #57 treats an unset root or missing target. The new test checks that the surrounding value writes and the second dispatch still run, and that the bad copy does not. CI is green. Approving.
One thing for the record: this stops the piece being lost, but it does not explain why a command named unmapped memory. Keep the counter and the first-time warning, they will be useful for the prologue crash investigation.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T16:59:47Z.
Rebased on main for
8765326(one test conflict: kept your indirect dispatch test next to this one). An indirect record at unmapped memory takes the same path:resolvefails in the command's prep, so that command is dropped alone. victory-gpu native tests (170), Windows clippy and policy pass.