native: note dispatch writes from safely read table records #451

Manually merged
github merged 1 commit from github-bot/gh-447 into main 2026-11-28 00:29:53 +00:00 AGit
Owner

@⁠lautarocherro on GitHub · 2026-11-27 19:53 UTC · original
lautarocherro:fix/note-written-safe-reads → main · +101 −15 · 3 files · 1 commits · merged 2026-11-28 00:28 UTC

What this changes

Refs #449. note_written runs for every prepared dispatch since 95627c66 and read each table record with a plain load. It now reads records like remirror_tables does (table_records: one safe_read, entry by entry if that fails) and looks the views up with one lock per table (descriptor::views_of). remirror_tables uses the same helper.

How it was tested

  • cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: 391 passed.
  • cargo test -p victory-gpu (native arm64, Metal Shader Converter set): 413 passed. New: a_table_running_into_an_unreadable_page_is_noted_without_a_fault (a table bound at the last entry of a page, its span running into a NO_ACCESS page). On main it ends the test process with SIGBUS.
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: passes. macOS clippy for victory-gpu: no finding on changed lines.
  • Ran the game, or not needed: not needed.

Checklist

  • No game files, game code, disassembly listings or SDK files are included
  • Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md (none)
  • New diagnostics are behind a VICTORY_* variable and documented (none)
**@⁠lautarocherro** on GitHub · 2026-11-27 19:53 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/447) `lautarocherro:fix/note-written-safe-reads` → `main` · +101 −15 · 3 files · 1 commits · merged 2026-11-28 00:28 UTC ## What this changes Refs #449. `note_written` runs for every prepared dispatch since 95627c66 and read each table record with a plain load. It now reads records like `remirror_tables` does (`table_records`: one `safe_read`, entry by entry if that fails) and looks the views up with one lock per table (`descriptor::views_of`). `remirror_tables` uses the same helper. ## How it was tested - [x] `cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory`: 391 passed. - [x] `cargo test -p victory-gpu` (native arm64, Metal Shader Converter set): 413 passed. New: `a_table_running_into_an_unreadable_page_is_noted_without_a_fault` (a table bound at the last entry of a page, its span running into a `NO_ACCESS` page). On main it ends the test process with SIGBUS. - [x] `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings`: passes. macOS clippy for victory-gpu: no finding on changed lines. - [x] Ran the game, or not needed: not needed. ## Checklist - [x] No game files, game code, disassembly listings or SDK files are included - [x] Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md (none) - [x] New diagnostics are behind a `VICTORY_*` variable and documented (none)
note_written read every record of a dispatch's bound resource tables
with plain loads, and since 95627c66 it runs for every dispatch. Part of
a table's span can be unreadable, which remirror_tables already handles
with safe_read. Both now read records through table_records (one
safe_read, entry by entry if that fails), and note_written looks the
views up with one lock per table (descriptor::views_of).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:57:09 +00:00
github-bot referenced this pull request from a commit 2026-11-28 00:29:35 +00:00
github manually merged commit fb01a16861 into main 2026-11-28 00:29:53 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.