gpu(native): extend remirror_tables window from shader table metadata #14

Manually merged
github merged 2 commits from gh-pr/14/head into gh-pr/14/base 2026-11-26 14:42:37 +00:00
Owner

@⁠claytonblythe on GitHub · 2026-11-26 09:07 UTC · original
claytonblythe:fix/remirror-table-entries → main · +147 −11 · 15 files · 2 commits · merged 2026-11-26 09:21 UTC

Summary

Addresses the NativeHost::remirror_tables 16-entry shortcut noted in docs/ROADMAP.md Section 1 and crates/victory-gpu/src/native/host.rs:

  • Records the highest fixed-offset descriptor-table entry read or declared per RootType::Table root slot during shader lowering (Lower::record_table_entry + native.used) and exposes it as HostShader::table_entries: Vec<(u8, u32)>.
  • Propagates table_entries into victory_gpu::native::list::Binding and passes the bound Binding (including Binding::ps on draws) into NativeHost::remirror_tables.
  • table_check_count keeps TABLE_CHECK = 16 as a floor when no metadata is present or fewer entries are declared, and extends the re-mirroring scan window to cover any higher table entries used by the bound compute, vertex, or pixel shader.

Testing

  • cargo test -p victory-shader --lib (all unit tests pass, including new test in emit::gfx_refusal_tests verifying a shader reading table entry 20 at byte offset 0x280 reports table_entries == [(3, 21)]).
  • cargo test --target x86_64-apple-darwin -p victory-gpu --lib native::host::tests (verifies table_check_count floor, per-slot extension, and VS+PS max merging).
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings (0 warnings).
  • cargo xtask policy (358 files ok).

Note: Tested via unit tests only; not yet run against the game executable.

**@⁠claytonblythe** on GitHub · 2026-11-26 09:07 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/14) `claytonblythe:fix/remirror-table-entries` → `main` · +147 −11 · 15 files · 2 commits · merged 2026-11-26 09:21 UTC ## Summary Addresses the `NativeHost::remirror_tables` 16-entry shortcut noted in `docs/ROADMAP.md` Section 1 and `crates/victory-gpu/src/native/host.rs`: - Records the highest fixed-offset descriptor-table entry read or declared per `RootType::Table` root slot during shader lowering (`Lower::record_table_entry` + `native.used`) and exposes it as `HostShader::table_entries: Vec<(u8, u32)>`. - Propagates `table_entries` into `victory_gpu::native::list::Binding` and passes the bound `Binding` (including `Binding::ps` on draws) into `NativeHost::remirror_tables`. - `table_check_count` keeps `TABLE_CHECK = 16` as a floor when no metadata is present or fewer entries are declared, and extends the re-mirroring scan window to cover any higher table entries used by the bound compute, vertex, or pixel shader. ## Testing - `cargo test -p victory-shader --lib` (all unit tests pass, including new test in `emit::gfx_refusal_tests` verifying a shader reading table entry 20 at byte offset `0x280` reports `table_entries == [(3, 21)]`). - `cargo test --target x86_64-apple-darwin -p victory-gpu --lib native::host::tests` (verifies `table_check_count` floor, per-slot extension, and VS+PS max merging). - `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` (0 warnings). - `cargo xtask policy` (358 files ok). *Note: Tested via unit tests only; not yet run against the game executable.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:42:35 +00:00
github manually merged commit fbd689d6f5 into gh-pr/14/base 2026-11-26 14:42:37 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 09:21 UTC · original · approved these changes

Reviewed and tested merged with main on macOS (tests, Windows clippy, policy). Thanks!

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 09:21 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/14#pullrequestreview-6071448127) · **approved these changes** Reviewed and tested merged with main on macOS (tests, Windows clippy, policy). Thanks!
This discussion has been locked. Commenting is limited to contributors.
No description provided.