Recompiler: handle packed ISG1 vertex inputs sharing a register (#105) #310

Merged
Michael-Glaser merged 1 commit from upstream-pr/313 into main 2026-12-02 13:15:09 +00:00
Michael-Glaser commented 2026-11-23 23:07:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-23T23:07:37Z.


Part of #105. Mode::Vertex named XclIn fields a{e.register} and ignored e.mask, emitting duplicate field names and reading wrong channels when two ISG1 inputs share a register. Overlaps #297 / #1371 (same packed-ISG1 issue, different approach).

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs: name XclIn fields a{k} by index (matching Mode::Pixel) and map VGPR channels using e.mask.
  • crates/xcl/src/gpu/recomp/tests.rs: unit test vertex_packed_isg1_inputs_get_distinct_fields_and_components.

Tested

  • Cross-checked on macOS (aarch64-apple-darwin, Rust 1.100.0): cargo check --offline --target x86_64-pc-windows-msvc --workspace --tests (0 errors, 0 new warnings).
  • Community Windows runs on exact head 40f90f7 by @JJAutoCompare (Windows 11, DXC 1.9.2609.5: vertex_packed_isg1_inputs_get_distinct_fields_and_components 1 passed, 0 failed) and @DavidM1911 (RTX 3060 Ti, merged with main: cargo test -p xcl --lib passed); plus earlier revision run by @regiumlepidi (RTX 5070 Ti + RDNA2 iGPU: 667 passed, 0 failed, 41 ignored; negative control confirmed).

Regression run
Retail 60 s smoke run contributed by @Toons29 (AMD Radeon RX 9070 RDNA4, driver 32.0.32029.2010, Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, release build, XCL_NETWORK=0):

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1628 (PresentX 1628)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Not tested

  • Not built or executed locally on Windows; the 60 s retail smoke run does not confirm whether that title has packed ISG1 vertex shaders; Intel GPUs not tested.

AI use

  • Antigravity with Gemini 4 Neon (audit, fix, unit test, description); community smoke run by @Toons29 with Claude Code (Claude Opus 5.5).
<!-- greyfinch-sync:ivall/xcl:issue:5462811318 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-23T23:07:37Z. --- Part of #105. `Mode::Vertex` named `XclIn` fields `a{e.register}` and ignored `e.mask`, emitting duplicate field names and reading wrong channels when two `ISG1` inputs share a register. Overlaps #297 / #1371 (same packed-ISG1 issue, different approach). **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs`: name `XclIn` fields `a{k}` by index (matching `Mode::Pixel`) and map VGPR channels using `e.mask`. - `crates/xcl/src/gpu/recomp/tests.rs`: unit test `vertex_packed_isg1_inputs_get_distinct_fields_and_components`. **Tested** - Cross-checked on macOS (`aarch64-apple-darwin`, Rust 1.100.0): `cargo check --offline --target x86_64-pc-windows-msvc --workspace --tests` (0 errors, 0 new warnings). - Community Windows runs on exact head `40f90f7` by `@JJAutoCompare` (Windows 11, DXC 1.9.2609.5: `vertex_packed_isg1_inputs_get_distinct_fields_and_components` 1 passed, 0 failed) and `@DavidM1911` (RTX 3060 Ti, merged with `main`: `cargo test -p xcl --lib` passed); plus earlier revision run by `@regiumlepidi` (RTX 5070 Ti + RDNA2 iGPU: 667 passed, 0 failed, 41 ignored; negative control confirmed). **Regression run** Retail 60 s smoke run contributed by `@Toons29` (AMD Radeon RX 9070 RDNA4, driver 32.0.32029.2010, Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, release build, `XCL_NETWORK=0`): ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1628 (PresentX 1628) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` **Not tested** - Not built or executed locally on Windows; the 60 s retail smoke run does not confirm whether that title has packed ISG1 vertex shaders; Intel GPUs not tested. **AI use** - Antigravity with Gemini 4 Neon (audit, fix, unit test, description); community smoke run by `@Toons29` with Claude Code (Claude Opus 5.5).
regiumlepidi commented 2026-11-24 07:04:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by regiumlepidi on 2026-11-23T23:46:24Z.


A Windows run for this draft, and a note that #297 (draft) fixes the same packed-ISG1 case in another way; the two conflict in emit.rs.

This PR: 18ca3b6 merged onto current main db1ddb2 (clean merge) builds and passes on both adapters: 667 passed, 0 failed, 41 ignored on an RTX 5070 Ti (driver 617.42) and on the Ryzen 7 9800X3D's RDNA2 iGPU (driver 32.0.21030.2001, XCL_ADAPTER=radeon); main alone is 666 / 0 / 41 on both. vertex_packed_isg1_inputs_get_distinct_fields_and_components fails with main's emit.rs and passes with this PR's. Windows 11 Pro 25H2, Ryzen 7 9800X3D, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100, debug, no XCL_SAMPLE_*.

Cross-check with #297 (a5b7825; #297 does not merge with main db1ddb2 any more, so each PR at its own head, on 9ab7d76). Each PR's tests appended to the other's tests.rs, both adapters, same result on each:

Fix #297's gpu_vs_packed_isg1_inputs (draws on the GPU) #297's vs_packed_isg1_inputs_are_members_of_their_own (HLSL text) #313's vertex_packed_isg1_inputs_get_distinct_fields_and_components (HLSL text)
main fails fails fails
#297 pass pass fails: its members are float2 a1_0 / float2 a1_2, not float4 a1 / a2
#313 pass fails: no a1_0 member pass

So on the one test that draws (packed TEXCOORD0 .xy / TEXCOORD1 .zw through an R32G32 input layout), both fixes give the expected pixels on NVIDIA and on RDNA2; the failing cross cases only assert the other PR's member names. Both read a component no element covers as 0u, and both keep an element alone in its register as float4 a…. The difference that is left: #313 declares every packed element as a 4-vector starting at component 0 and indexes by the bits of its mask, #297 declares each with its own width.

Not tested: scripts/smoke.ps1 on a real title (I have none); RDNA3 / RDNA4, Intel.

AI use: Claude Code with Claude Opus 5.5 ran the builds and the cross-check and wrote this comment; the numbers come from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7117347086 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/313#issuecomment-7117347086). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-23T23:46:24Z. --- A Windows run for this draft, and a note that #297 (draft) fixes the same packed-ISG1 case in another way; the two conflict in `emit.rs`. **This PR:** `18ca3b6` merged onto current `main` `db1ddb2` (clean merge) builds and passes on both adapters: 667 passed, 0 failed, 41 ignored on an RTX 5070 Ti (driver 617.42) and on the Ryzen 7 9800X3D's RDNA2 iGPU (driver 32.0.21030.2001, `XCL_ADAPTER=radeon`); `main` alone is 666 / 0 / 41 on both. `vertex_packed_isg1_inputs_get_distinct_fields_and_components` fails with `main`'s `emit.rs` and passes with this PR's. Windows 11 Pro 25H2, Ryzen 7 9800X3D, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100, debug, no `XCL_SAMPLE_*`. **Cross-check with #297** (`a5b7825`; #297 does not merge with `main` `db1ddb2` any more, so each PR at its own head, on `9ab7d76`). Each PR's tests appended to the other's `tests.rs`, both adapters, same result on each: | Fix | #297's `gpu_vs_packed_isg1_inputs` (draws on the GPU) | #297's `vs_packed_isg1_inputs_are_members_of_their_own` (HLSL text) | #313's `vertex_packed_isg1_inputs_get_distinct_fields_and_components` (HLSL text) | |---|---|---|---| | `main` | fails | fails | fails | | #297 | pass | pass | fails: its members are `float2 a1_0` / `float2 a1_2`, not `float4 a1` / `a2` | | #313 | **pass** | fails: no `a1_0` member | pass | So on the one test that draws (packed TEXCOORD0 .xy / TEXCOORD1 .zw through an R32G32 input layout), both fixes give the expected pixels on NVIDIA and on RDNA2; the failing cross cases only assert the other PR's member names. Both read a component no element covers as `0u`, and both keep an element alone in its register as `float4 a…`. The difference that is left: #313 declares every packed element as a 4-vector starting at component 0 and indexes by the bits of its mask, #297 declares each with its own width. **Not tested:** `scripts/smoke.ps1` on a real title (I have none); RDNA3 / RDNA4, Intel. AI use: Claude Code with Claude Opus 5.5 ran the builds and the cross-check and wrote this comment; the numbers come from those runs.
upipibi commented 2026-11-24 15:05:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T14:07:48Z.


This and #297 (opened 28 minutes earlier) both fix the packed ISG1 vertex inputs of #105: two elements in one register become two XclIn members instead of two members with one name. They differ in how a fetch-shader VGPR finds its member:

  • #297 names a packed member a{register}_{first} and declares only the components of its mask. It maps VGPR input_vgpr + c to component c - first. A component no element covers stays 0.
  • This PR numbers all members a{k}, each a full 4-vector. It maps by the popcount of the element's mask below the channel, and falls back to the first element whose register holds the VGPR.

Both have tests. They edit the same lines of emit.rs, so only one can land. Read from the diffs only; I have not run either.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ivall/xcl:comment:7133885947 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/313#issuecomment-7133885947). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T14:07:48Z. --- This and #297 (opened 28 minutes earlier) both fix the packed ISG1 vertex inputs of #105: two elements in one register become two `XclIn` members instead of two members with one name. They differ in how a fetch-shader VGPR finds its member: - #297 names a packed member `a{register}_{first}` and declares only the components of its mask. It maps VGPR `input_vgpr + c` to component `c - first`. A component no element covers stays 0. - This PR numbers all members `a{k}`, each a full `4`-vector. It maps by the popcount of the element's mask below the channel, and falls back to the first element whose register holds the VGPR. Both have tests. They edit the same lines of `emit.rs`, so only one can land. Read from the diffs only; I have not run either. AI-assisted (Claude Code).
throny commented 2026-11-24 21:08:59 +00:00 (Migrated from github.com)

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


Two contributors checked independently and found that #297 #1371 solves the same problem (for #105) in a different way: #1607, group D20. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7142383436 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7142383436). Originally posted by [throny](https://github.com/throny) on 2026-11-24T19:38:27Z. --- <!-- xcl-1607-hint:D20 --> Two contributors checked independently and found that #297 #1371 solves the same problem (for #105) in a different way: #1607, group D20. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Toons29 commented 2026-11-25 03:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T02:54:27Z.


Regression run of 40f90f7b on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1628 (PresentX 1628)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7151342614 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7151342614). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T02:54:27Z. --- Regression run of `40f90f7b` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1628 (PresentX 1628) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
JJAutoCompare commented 2026-11-25 05:08:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:13:04Z.


Tested

Independent native Windows run for xcl-dev/xcl#313 at 40f90f7b09fcad72ebcc4822b77b8f521e3049a7, verified as the open PR head before the run. The assigned detached checkout was clean before and after testing. The PR discussion had a same-head AMD retail smoke run and an older-revision Windows suite run. It had no equivalent exact-head focused CPU result.

STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 x64 (build 26200.9974), AMD Ryzen 7 3800X, Rust and Cargo 1.100.0 (stable-x86_64-pc-windows-msvc, rustc 0ef1bc386). Cargo used the unoptimized test profile with debug info and incremental compilation disabled. XCL logged dxcompiler and dxil 1.9.2609.5.

cargo test --locked -p xcl --lib gpu::recomp::tests::vertex_packed_isg1_inputs_get_distinct_fields_and_components -- --exact --nocapture --test-threads=1

Exit 0. 1 passed, 0 failed, 0 ignored, 0 skipped, 719 filtered out. The synthetic fixture asserts complete HLSL translation, distinct float4 fields a0, a1, and a2 for POSITION0, TEXCOORD0, and TEXCOORD1, and VGPR reads v4/v7 from a0[0/3], v8/v9 from a1[0/1], and v10/v11 from a2[0/1], including the remap from the shared register's .zw. The run loaded DXC and successfully compiled main as vs_6_6 to DXIL with DXC's default validation. The build emitted one deprecation warning for fetch_update in xgameruntime.

Not tested

Separate DXIL validation, D3D12 pipeline creation, GPU execution, retail titles, the workspace suite, and comparison with #1371.

AI use

T3 Code / Codex (gpt-6.2-sol) inspected the fixture, ran the existing test, and wrote this report.

Raw evidence: L:/XclTooling/pr313/environment.log, L:/XclTooling/pr313/cargo-test.log, L:/XclTooling/pr313/pr-313.html.

<!-- greyfinch-sync:ivall/xcl:comment:7152638933 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7152638933). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:13:04Z. --- **Tested** Independent native Windows run for xcl-dev/xcl#313 at `40f90f7b09fcad72ebcc4822b77b8f521e3049a7`, verified as the open PR head before the run. The assigned detached checkout was clean before and after testing. The PR discussion had a same-head AMD retail smoke run and an older-revision Windows suite run. It had no equivalent exact-head focused CPU result. STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 x64 (build 26200.9974), AMD Ryzen 7 3800X, Rust and Cargo 1.100.0 (`stable-x86_64-pc-windows-msvc`, rustc `0ef1bc386`). Cargo used the unoptimized test profile with debug info and incremental compilation disabled. XCL logged dxcompiler and dxil 1.9.2609.5. ```powershell cargo test --locked -p xcl --lib gpu::recomp::tests::vertex_packed_isg1_inputs_get_distinct_fields_and_components -- --exact --nocapture --test-threads=1 ``` Exit 0. **1 passed, 0 failed, 0 ignored, 0 skipped**, 719 filtered out. The synthetic fixture asserts complete HLSL translation, distinct `float4` fields `a0`, `a1`, and `a2` for `POSITION0`, `TEXCOORD0`, and `TEXCOORD1`, and VGPR reads `v4/v7` from `a0[0/3]`, `v8/v9` from `a1[0/1]`, and `v10/v11` from `a2[0/1]`, including the remap from the shared register's `.zw`. The run loaded DXC and successfully compiled `main` as `vs_6_6` to DXIL with DXC's default validation. The build emitted one deprecation warning for `fetch_update` in `xgameruntime`. **Not tested** Separate DXIL validation, D3D12 pipeline creation, GPU execution, retail titles, the workspace suite, and comparison with #1371. **AI use** T3 Code / Codex (gpt-6.2-sol) inspected the fixture, ran the existing test, and wrote this report. Raw evidence: `L:/XclTooling/pr313/environment.log`, `L:/XclTooling/pr313/cargo-test.log`, `L:/XclTooling/pr313/pr-313.html`.
DavidM1911 commented 2026-11-25 15:07:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T14:43:34Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7165718240 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7165718240). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T14:43:34Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Michael-Glaser commented 2026-11-27 12:01:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-27T12:01:38Z.


Thanks @Toons29, @JJAutoCompare, @DavidM1911, and @upipibi! Added the verbatim xcl-smoke v1 regression blocks for 40f90f7 and the exact-head DXC test results into the PR description. Happy to defer to #297 / #1371 if maintainers prefer one of those approaches.

<!-- greyfinch-sync:ivall/xcl:comment:7217750531 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7217750531). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-27T12:01:38Z. --- Thanks @Toons29, @JJAutoCompare, @DavidM1911, and @upipibi! Added the verbatim `xcl-smoke v1` regression blocks for `40f90f7` and the exact-head DXC test results into the PR description. Happy to defer to #297 / #1371 if maintainers prefer one of those approaches.
BBareth commented 2026-11-30 19:20:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T19:20:39Z.


merge-check claim
head: 40f90f7b09

<!-- greyfinch-sync:ivall/xcl:comment:7289238489 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7289238489). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T19:20:39Z. --- merge-check claim head: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7
BBareth commented 2026-11-30 19:40:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T19:40:33Z.


merge-check
base: ff0c364b3d
head: 40f90f7b09
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, run in the same batch: 2888 passed, 1 failed, 51 ignored, 28 SKIPPED lines; its one failure, hle::d3d12x::pso_async::used_tests::emission_resolves_the_retained_recipe_after_title_address_reuse, passed in this merged run and in the six others of the batch, so it is intermittent on the base and not this PR's. The new test vertex_packed_isg1_inputs_get_distinct_fields_and_components passed (it compiles the result with DXC), and so did the existing vs_system_values_in_isg1_registers.
review: no blocking finding; two files, every hunk read. XclIn fields are now named by the element's index, not its register, so two ISG1 elements packed into one register no longer produce two fields of the same name. A VGPR of a packed register reads the element whose mask covers that channel, at component popcount(mask below the channel), since the input assembler loads each semantic from component 0; a channel no mask covers falls back to the register's first element at the raw channel, which keeps the old result (e.g. POSITION.w with mask 0x7). The only other xi.a{..} in emit.rs is the pixel-stage interpolation, which has its own struct and is not touched. Two notes, not blocking: #297 addresses the same issue (#105) and currently conflicts with main, so only one of the two should go in; and there is no GPU run of a vertex shader with packed inputs here, the evidence is the generated HLSL and its DXC compile. Not done: a retail title run.
performance: none at run time: only the names and component indices of vertex input fields in the generated HLSL change.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7289765592 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7289765592). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T19:40:33Z. --- merge-check base: ff0c364b3de011c13ed45865480c21918a79ec89 head: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, run in the same batch: 2888 passed, 1 failed, 51 ignored, 28 SKIPPED lines; its one failure, `hle::d3d12x::pso_async::used_tests::emission_resolves_the_retained_recipe_after_title_address_reuse`, passed in this merged run and in the six others of the batch, so it is intermittent on the base and not this PR's. The new test `vertex_packed_isg1_inputs_get_distinct_fields_and_components` passed (it compiles the result with DXC), and so did the existing `vs_system_values_in_isg1_registers`. review: no blocking finding; two files, every hunk read. `XclIn` fields are now named by the element's index, not its register, so two ISG1 elements packed into one register no longer produce two fields of the same name. A VGPR of a packed register reads the element whose mask covers that channel, at component popcount(mask below the channel), since the input assembler loads each semantic from component 0; a channel no mask covers falls back to the register's first element at the raw channel, which keeps the old result (e.g. POSITION.w with mask 0x7). The only other `xi.a{..}` in `emit.rs` is the pixel-stage interpolation, which has its own struct and is not touched. Two notes, not blocking: #297 addresses the same issue (#105) and currently conflicts with `main`, so only one of the two should go in; and there is no GPU run of a vertex shader with packed inputs here, the evidence is the generated HLSL and its DXC compile. Not done: a retail title run. performance: none at run time: only the names and component indices of vertex input fields in the generated HLSL change. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
coolpersonnn commented 2026-11-30 19:48:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-30T19:48:07Z.


merge-check claim
head: 40f90f7b09

<!-- greyfinch-sync:ivall/xcl:comment:7289958305 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7289958305). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-30T19:48:07Z. --- merge-check claim head: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7
coolpersonnn commented 2026-11-30 19:53:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-30T19:53:17Z.


merge-check
base: ff0c364b3d
head: 40f90f7b09
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 0 failed, 51 ignored (25 SKIPPED: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache); failing: none; new test gpu::recomp::tests::vertex_packed_isg1_inputs_get_distinct_fields_and_components passed (including DXC vs_6_6 compile)
review: none. Read the full diff (+59/-4 across crates/xcl/src/gpu/recomp/emit.rs and crates/xcl/src/gpu/recomp/tests.rs). Naming non-SV vertex inputs in XclIn by enumerated index a{k} avoids duplicate HLSL field names when multiple ISG1 elements share a register; channel lookup matches (e.mask >> chan) & 1 != 0 and computes the packed component index via (e.mask & ((1u8 << chan) - 1)).count_ones(), with a fallback to the first element at that register for unmasked channels (e.g. POSITION.w on mask 0x7). Unit test verifies distinct fields (a0/a1/a2), component mapping for .xy (0x3) and .zw (0xC) sharing register 1, unmasked .w fallback, and DXC vs_6_6 compilation. Already tracked in #1607 group D20 (#297, #313, #1371 — triaged as different approaches); no new duplicates found.
performance: none (compile-time HLSL emission only; generated vertex shader reads the same inputs)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5090 (driver 32.0.16.2101), AMD Ryzen 9 9950X3D, Windows 11 Pro build 26300, Rust 1.100.0 / T3 Code (Antigravity), Gemini 4 Neon (Medium)

<!-- greyfinch-sync:ivall/xcl:comment:7290084689 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7290084689). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-30T19:53:17Z. --- merge-check base: ff0c364b3de011c13ed45865480c21918a79ec89 head: 40f90f7b09fcad72ebcc4822b77b8f521e3049a7 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 0 failed, 51 ignored (25 SKIPPED: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache); failing: none; new test gpu::recomp::tests::vertex_packed_isg1_inputs_get_distinct_fields_and_components passed (including DXC vs_6_6 compile) review: none. Read the full diff (+59/-4 across crates/xcl/src/gpu/recomp/emit.rs and crates/xcl/src/gpu/recomp/tests.rs). Naming non-SV vertex inputs in XclIn by enumerated index `a{k}` avoids duplicate HLSL field names when multiple ISG1 elements share a register; channel lookup matches `(e.mask >> chan) & 1 != 0` and computes the packed component index via `(e.mask & ((1u8 << chan) - 1)).count_ones()`, with a fallback to the first element at that register for unmasked channels (e.g. POSITION.w on mask 0x7). Unit test verifies distinct fields (`a0`/`a1`/`a2`), component mapping for `.xy` (0x3) and `.zw` (0xC) sharing register 1, unmasked `.w` fallback, and DXC `vs_6_6` compilation. Already tracked in #1607 group D20 (#297, #313, #1371 — triaged as different approaches); no new duplicates found. performance: none (compile-time HLSL emission only; generated vertex shader reads the same inputs) verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 5090 (driver 32.0.16.2101), AMD Ryzen 9 9950X3D, Windows 11 Pro build 26300, Rust 1.100.0 / T3 Code (Antigravity), Gemini 4 Neon (Medium)
Foniass commented 2026-12-01 03:07:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:07:02Z.


Triage (#1607) – head 40f90f7

#297 and #1371 fix the same duplicate a{register} XclIn member (#105), in different ways (group D20 in #1607). #297 gives only packed elements their own member, a{reg}_{first}, sized to the mask, and has a GPU draw test. This PR renames every input to a{k} and maps each channel by the mask bits. #1371 reads the packed member at the register channel, so a .zw element gets the IA default.
In emit.rs (Mode::Vertex), a component that no element at a packed register covers falls back to the first element's a{k}[v-b], which is that element's IA default. #297 reads 0u there.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299341651 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/313#issuecomment-7299341651). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:07:02Z. --- **Triage (#1607)** – head 40f90f7 #297 and #1371 fix the same duplicate `a{register}` XclIn member (#105), in different ways (group D20 in #1607). #297 gives only packed elements their own member, `a{reg}_{first}`, sized to the mask, and has a GPU draw test. This PR renames every input to `a{k}` and maps each channel by the mask bits. #1371 reads the packed member at the register channel, so a .zw element gets the IA default. In emit.rs (Mode::Vertex), a component that no element at a packed register covers falls back to the first element's `a{k}[v-b]`, which is that element's IA default. #297 reads 0u there. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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!310
No description provided.