Recompiler: route mesh parameter exports through the output register table #1703

Closed
tylerstraub wants to merge 1 commit from upstream-pr/1713 into main
tylerstraub commented 2026-11-24 19:37:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tylerstraub on 2026-11-24T19:37:02Z.


Mesh parameter exports can name a different register from the one implied by signature order. XCL already reads the console's output table for vertex shaders. This change uses the same table to route mesh exports to the pixel shader.

Native Windows GPU test requested. Please test commit 2b6c096 on native Windows with a mesh-shader-capable GPU. Run cargo build --workspace followed by cargo test --workspace -- --test-threads=4 and share the pass, fail, ignore and skip counts along with your GPU and driver. This is the outstanding validation before the draft is ready for review.

What is in it

  • Both the HLSL and direct DXIL mesh translators use the same lookup. An empty or unrecognized table uses the existing signature order.
  • A synthetic mesh and pixel shader draw one triangle. The pixel shader reads red and green components from both outputs. The test checks identity, swapped, empty and invalid tables against a floating-point render target.

Tested

  • Ryzen 9 9950X3D, RTX 5090, NVIDIA 595.99.02, DXC 1.9.2609.5. Windows GNU release binaries built with Rust 1.100.0 and run under Proton Experimental on Linux.
  • On main c160d86ef, the identity control matched 256/256 pixels and the swapped case matched 0/256. On the candidate, cargo test -p xcl --lib synthetic_mesh_parameter_table (cross-target, Proton runner) matched 256/256 in each of the four cases on each translation path. The direct translator reported four translations and zero fallbacks. The existing gpu_mesh_mode_two_passes test also passed independently in both configurations.
  • I ran the workspace suite on main and the candidate with four test threads. Both failed the same four targets (library, title end-to-end, PLS quota and predication). The library process aborted, so a complete suite total is unavailable. There were four explicit skip notices on each build. In a diagnostic rerun, a GPU atomics test timed out before the new test ran. The new test then reported that the D3D12 device had already been removed. Native Windows GPU validation remains outstanding.

Regression run

I ran the unchanged upstream smoke script with PowerShell 7.4.13 on Linux, using a Wine launcher for XCL. Both used the same title, isolated prefix setup and 60-second limit. Proton reported zero for peak process commit on both runs, so the blocks cannot establish a memory comparison.

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 5090
title: game
seconds: 60
exit: 0x0
frames shown: 1562 (PresentX 1562)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB
xcl-smoke v1
commit: 2b6c096360eac8ccb1aa28e48a4f3f18128e809a
gpu: NVIDIA GeForce RTX 5090
title: game
seconds: 60
exit: 0x0
frames shown: 1570 (PresentX 1570)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

Native Windows, AMD hardware, console reference output, and a visible change during world gameplay.

AI use

Codex (GPT-6) implemented the change and synthetic test, ran the comparisons, and prepared this description.

<!-- greyfinch-sync:ivall/xcl:issue:6589857576 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1713). Originally posted by [tylerstraub](https://github.com/tylerstraub) on 2026-11-24T19:37:02Z. --- Mesh parameter exports can name a different register from the one implied by signature order. XCL already reads the console's output table for vertex shaders. This change uses the same table to route mesh exports to the pixel shader. **Native Windows GPU test requested.** Please test commit `2b6c096` on native Windows with a mesh-shader-capable GPU. Run `cargo build --workspace` followed by `cargo test --workspace -- --test-threads=4` and share the pass, fail, ignore and skip counts along with your GPU and driver. This is the outstanding validation before the draft is ready for review. **What is in it** - Both the HLSL and direct DXIL mesh translators use the same lookup. An empty or unrecognized table uses the existing signature order. - A synthetic mesh and pixel shader draw one triangle. The pixel shader reads red and green components from both outputs. The test checks identity, swapped, empty and invalid tables against a floating-point render target. **Tested** - Ryzen 9 9950X3D, RTX 5090, NVIDIA 595.99.02, DXC 1.9.2609.5. Windows GNU release binaries built with Rust 1.100.0 and run under Proton Experimental on Linux. - On main `c160d86ef`, the identity control matched 256/256 pixels and the swapped case matched 0/256. On the candidate, `cargo test -p xcl --lib synthetic_mesh_parameter_table` (cross-target, Proton runner) matched 256/256 in each of the four cases on each translation path. The direct translator reported four translations and zero fallbacks. The existing `gpu_mesh_mode_two_passes` test also passed independently in both configurations. - I ran the workspace suite on main and the candidate with four test threads. Both failed the same four targets (library, title end-to-end, PLS quota and predication). The library process aborted, so a complete suite total is unavailable. There were four explicit skip notices on each build. In a diagnostic rerun, a GPU atomics test timed out before the new test ran. The new test then reported that the D3D12 device had already been removed. Native Windows GPU validation remains outstanding. **Regression run** I ran the unchanged upstream smoke script with PowerShell 7.4.13 on Linux, using a Wine launcher for XCL. Both used the same title, isolated prefix setup and 60-second limit. Proton reported zero for peak process commit on both runs, so the blocks cannot establish a memory comparison. ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: NVIDIA GeForce RTX 5090 title: game seconds: 60 exit: 0x0 frames shown: 1562 (PresentX 1562) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` ``` xcl-smoke v1 commit: 2b6c096360eac8ccb1aa28e48a4f3f18128e809a gpu: NVIDIA GeForce RTX 5090 title: game seconds: 60 exit: 0x0 frames shown: 1570 (PresentX 1570) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` **Not tested** Native Windows, AMD hardware, console reference output, and a visible change during world gameplay. **AI use** Codex (GPT-6) implemented the change and synthetic test, ran the comparisons, and prepared this description.
nnonno91 commented 2026-11-24 21:09:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T19:45:38Z.


Native Windows GPU validation of 2b6c096360eac8ccb1aa28e48a4f3f18128e809a on the Radeon iGPU and RTX 5090. The mesh parameter test matched all four cases on both GPUs and both translation paths.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62, native wave64) and NVIDIA GeForce RTX 5090 (32.0.16.1742, split wave64). Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11, debug/test profiles.
  • On the clean PR head, cargo build --workspace --locked passed. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output with default shader settings reported 859 passed, 0 failed, 42 ignored on each GPU. I selected the adapters with XCL_ADAPTER.
  • Explicit skips counted as passes by the test harness: heap_window_out_of_memory_falls_back_to_the_switch_form on both GPUs (no heap windows). The RTX 5090 also skipped gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no native wave64).
  • cargo test --locked -p xcl --lib gpu::recomp::tests::synthetic_mesh_parameter_table -- --exact --nocapture with XCL_DIRECT_DXIL=0 and =1 on each GPU: per invocation 1 passed, 0 failed, 0 ignored, no skips. Identity, swapped, empty and invalid tables each matched 256/256 covered pixels in all four invocations. XCL_DIRECT_DXIL_STATS=1 reported 4 direct mesh translations, 0 HLSL fallbacks on each GPU's direct run.
  • cargo test --locked -p xcl --lib gpu::recomp::tests::gpu_mesh_mode_two_passes -- --exact --nocapture also passed with both settings on both GPUs (1 passed, 0 failed, 0 ignored per invocation, no skips).
  • As a Windows baseline control, I temporarily copied only synthetic_mesh_parameter_table onto c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 and ran the same command on the Radeon with XCL_DIRECT_DXIL=0 and =1. Both runs matched 256/256 for identity and 0/256 for swapped, failing at the expected swapped-case assertion. The baseline worktree was restored afterward.

Not tested

Retail-title output, console reference captures, or timing on this setup.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) ran the tests, checked the logs, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7142550685 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1713#issuecomment-7142550685). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T19:45:38Z. --- Native Windows GPU validation of `2b6c096360eac8ccb1aa28e48a4f3f18128e809a` on the Radeon iGPU and RTX 5090. The mesh parameter test matched all four cases on both GPUs and both translation paths. **Tested** - Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62, native wave64) and NVIDIA GeForce RTX 5090 (32.0.16.1742, split wave64). Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11, debug/test profiles. - On the clean PR head, `cargo build --workspace --locked` passed. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` with default shader settings reported **859 passed, 0 failed, 42 ignored** on each GPU. I selected the adapters with `XCL_ADAPTER`. - Explicit skips counted as passes by the test harness: `heap_window_out_of_memory_falls_back_to_the_switch_form` on both GPUs (no heap windows). The RTX 5090 also skipped `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no native wave64). - `cargo test --locked -p xcl --lib gpu::recomp::tests::synthetic_mesh_parameter_table -- --exact --nocapture` with `XCL_DIRECT_DXIL=0` and `=1` on each GPU: per invocation **1 passed, 0 failed, 0 ignored**, no skips. Identity, swapped, empty and invalid tables each matched **256/256 covered pixels** in all four invocations. `XCL_DIRECT_DXIL_STATS=1` reported **4 direct mesh translations, 0 HLSL fallbacks** on each GPU's direct run. - `cargo test --locked -p xcl --lib gpu::recomp::tests::gpu_mesh_mode_two_passes -- --exact --nocapture` also passed with both settings on both GPUs (1 passed, 0 failed, 0 ignored per invocation, no skips). - As a Windows baseline control, I temporarily copied only `synthetic_mesh_parameter_table` onto `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0` and ran the same command on the Radeon with `XCL_DIRECT_DXIL=0` and `=1`. Both runs matched **256/256** for identity and **0/256** for swapped, failing at the expected swapped-case assertion. The baseline worktree was restored afterward. **Not tested** Retail-title output, console reference captures, or timing on this setup. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable) ran the tests, checked the logs, and wrote this report.
LocranKing commented 2026-11-24 21:09:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T20:37:35Z.


Independent Windows release verification on NVIDIA RTX 3060 Ti (2b6c096360eac8ccb1aa28e48a4f3f18128e809a vs base main c160d86ef2efe3a07e4dfb473e4fa72eafb413c0).

Setup

  • GPU: NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, wave32), driver 32.0.16.2101
  • CPU / RAM: AMD Ryzen 5 5500 (6C/12T), 31.8 GB RAM
  • OS: Windows 11 Home Single Language, build 26200
  • Toolchain: rustc 1.100.0, DXC 1.9.2602.17, --release

Workspace tests (cargo test --workspace --release --no-fail-fast -- --test-threads=4)

  • Exit 0: 859 passed, 0 failed, 42 ignored across 20 result blocks (SKIPPED: 2 no wave64, 2 no D3D12 debug layer, heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).

Regression run (scripts/smoke.ps1, 60 s, XCL_NETWORK=0, title folder name redacted)

  • PR head vs base main: 1569 / 1538 frames (102.0%), 15216 / 16245 MB peak commit (93.7%), 0 device removals, 0 crashes.

Base (main c160d86):

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1538 (PresentX 1538)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16245 MB

PR head (2b6c096):

xcl-smoke v1
commit: 2b6c096360eac8ccb1aa28e48a4f3f18128e809a
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1569 (PresentX 1570)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15216 MB

Not tested: debug build, AMD / wave64 hardware, retail mesh shader visual diff beyond the 60 s smoke.

AI use: Antigravity (Gemini 4 Neon) built and ran the test suite and smoke pair on this hardware and drafted this report from the captured outputs; reviewed before posting. No game files attached.

<!-- greyfinch-sync:ivall/xcl:comment:7143835964 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1713#issuecomment-7143835964). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T20:37:35Z. --- Independent Windows release verification on NVIDIA RTX 3060 Ti (`2b6c096360eac8ccb1aa28e48a4f3f18128e809a` vs base `main` `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`). **Setup** - GPU: NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, wave32), driver `32.0.16.2101` - CPU / RAM: AMD Ryzen 5 5500 (6C/12T), `31.8 GB` RAM - OS: Windows 11 Home Single Language, build `26200` - Toolchain: `rustc 1.100.0`, DXC `1.9.2602.17`, `--release` **Workspace tests (`cargo test --workspace --release --no-fail-fast -- --test-threads=4`)** - Exit `0`: **859 passed, 0 failed, 42 ignored** across 20 result blocks (`SKIPPED`: 2 `no wave64`, 2 `no D3D12 debug layer`, `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`). **Regression run (`scripts/smoke.ps1`, 60 s, `XCL_NETWORK=0`, title folder name redacted)** - PR head vs base `main`: `1569 / 1538` frames (**102.0%**), `15216 / 16245 MB` peak commit (**93.7%**), `0` device removals, `0` crashes. Base (`main` `c160d86`): ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1538 (PresentX 1538) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16245 MB ``` PR head (`2b6c096`): ``` xcl-smoke v1 commit: 2b6c096360eac8ccb1aa28e48a4f3f18128e809a gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1569 (PresentX 1570) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15216 MB ``` **Not tested:** debug build, AMD / wave64 hardware, retail mesh shader visual diff beyond the 60 s smoke. **AI use:** Antigravity (`Gemini 4 Neon`) built and ran the test suite and smoke pair on this hardware and drafted this report from the captured outputs; reviewed before posting. No game files attached.
DavidM1911 commented 2026-11-24 23:08:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:19:00Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7146079114 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1713#issuecomment-7146079114). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T22:19:00Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
upstream-sync closed this pull request 2026-11-25 13:04:16 +00:00

Pull request closed

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!1703
No description provided.