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

Manually merged
github merged 1 commit from gh-pr/124/head into gh-pr/124/base 2026-11-26 04:11:22 +00:00
Owner

@⁠Foniass on GitHub · 2026-11-23 13:31 UTC · original
Foniass:fix/mesh-gs-windows → main · +82 −18 · 5 files · 1 commits · merged 2026-11-23 14:13 UTC

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

**@⁠Foniass** on GitHub · 2026-11-23 13:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/124) `Foniass:fix/mesh-gs-windows` → `main` · +82 −18 · 5 files · 1 commits · merged 2026-11-23 14:13 UTC 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)
translate_mesh / translate_geometry used one memory window while VS / PS / CS
get the title's four (pso::mem_windows): an NGG or legacy GS program reading
title memory above the first window (a V#, an SGPR pair or a 64-bit address
there) read window 0 at the same offset instead. pso::console_mesh /
console_geometry pass the title's windows now, and --precompile translates MS
programs with them too.

gpu_mesh_mode_reads_memory_windows runs an NGG program's compute pass on unified
memory with its vertex table in window 1 and decoys at the same offset in
window 0: four windows read the table, one window (the old translation) the
decoys. The GS test also translates with four windows and compiles the result.

This changes these programs' HLSL, so their DXIL is compiled again once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:11:21 +00:00
github manually merged commit 3304bb1105 into gh-pr/124/base 2026-11-26 04:11:22 +00:00
Author
Owner

@⁠ivall on GitHub · 2026-11-23 14:14 UTC · original

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!

**@⁠ivall** on GitHub · 2026-11-23 14:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/124#issuecomment-7103688217) 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!
This discussion has been locked. Commenting is limited to contributors.
No description provided.