MS and GS programs translate with the title's memory windows #123

Merged
Foniass merged 1 commit from upstream-pr/124 into main 2026-11-23 14:13:38 +00:00
Foniass commented 2026-11-23 13:31:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-23T13:31:58Z.


Follow-up to the question in #113: translate_mesh / translate_geometry translated with 1 memory window while VS / PS / CS get the title's 4 (pso::mem_windows). An NGG or legacy GS program reading title memory above the first window (a V#, SGPR pair or 64-bit address there) read window 0 at the same offset instead.

Change

  • translate_mesh / translate_geometry: take mem_windows. pso::console_mesh / console_geometry pass mem_windows().
  • --precompile: translates MS programs with the title's windows as well, as the runtime now does.
  • Geometry: the GS input ring (xcl_vin, read in the entry before any window is selected) still reads window 0, as before.
  • Cache: these programs' HLSL changes, so their DXIL compiles once more.

Test

  • gpu_mesh_mode_reads_memory_windows: an NGG program's compute pass runs on unified memory (runner::run_in_arena, 2 windows). Its V# points at a vertex table in window 1, with decoys at the same offset in window 0. Translated with the windows, the record gets the table. Translated with one window (the old translation), it gets the decoys, so the test fails without this change.
  • GS test: gpu_geometry_wave32_prefix_count_over_a_mask also translates its ES+GS program with 4 windows, checks that all four are declared, and compiles it.
  • Workspace: cargo test --workspace --release with XCL_SAMPLE_RPF (the retail pack) on an RTX 5070 Ti: 528 passed, 0 failed, 2 no wave64 skips as on main. The new test also passes with XCL_SPLIT_WAVE64=1.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:6560458884 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/124). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-23T13:31:58Z. --- Follow-up to the question in #113: `translate_mesh` / `translate_geometry` translated with 1 memory window while VS / PS / CS get the title's 4 (`pso::mem_windows`). An NGG or legacy GS program reading title memory above the first window (a V#, SGPR pair or 64-bit address there) read window 0 at the same offset instead. ### Change - **`translate_mesh` / `translate_geometry`:** take `mem_windows`. `pso::console_mesh` / `console_geometry` pass `mem_windows()`. - **`--precompile`:** translates MS programs with the title's windows as well, as the runtime now does. - **Geometry:** the GS input ring (`xcl_vin`, read in the entry before any window is selected) still reads window 0, as before. - **Cache:** these programs' HLSL changes, so their DXIL compiles once more. ### Test - **`gpu_mesh_mode_reads_memory_windows`:** an NGG program's compute pass runs on unified memory (`runner::run_in_arena`, 2 windows). Its V# points at a vertex table in window 1, with decoys at the same offset in window 0. Translated with the windows, the record gets the table. Translated with one window (the old translation), it gets the decoys, so the test fails without this change. - **GS test:** `gpu_geometry_wave32_prefix_count_over_a_mask` also translates its ES+GS program with 4 windows, checks that all four are declared, and compiles it. - **Workspace:** `cargo test --workspace --release` with `XCL_SAMPLE_RPF` (the retail pack) on an RTX 5070 Ti: 528 passed, 0 failed, 2 `no wave64` skips as on `main`. The new test also passes with `XCL_SPLIT_WAVE64=1`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 06:57:15 +00:00
ivall commented 2026-11-24 07:00:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T14:14:11Z.


Merged. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129: cargo test --workspace green with the retail samples (shader pack, console DLLs, texture archive), lib tests also with XCL_SPLIT_WAVE64=1; the retail pack still translates 26 698 / 26 698; the FSR4 GPU probe passes; Unicorn Overlord and XDefiant run. Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7103688217 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/124#issuecomment-7103688217). Originally posted by [ivall](https://github.com/ivall) on 2026-11-23T14:14:11Z. --- Merged. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129: `cargo test --workspace` green with the retail samples (shader pack, console DLLs, texture archive), lib tests also with `XCL_SPLIT_WAVE64=1`; the retail pack still translates 26 698 / 26 698; the FSR4 GPU probe passes; Unicorn Overlord and XDefiant run. Thanks!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!123
No description provided.