Recompiler: preserve interleaved packed VS input components #309
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!309
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-309"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@likecrank-dotcom on GitHub · 2026-11-23 23:05 UTC · original
likecrank-dotcom:fix/packed-input-component-masks→main· +182 −4 · 2 files · 2 commits · draftStacked on #297. Only the top commit (
a039d33) is mine; the first commit is #297's packed-input implementation by TG0000, replayed onto current main without its older documentation/workflow ancestry.With TEXCOORD0.xz and TEXCOORD1.y sharing r1, selecting an input by its first-to-last component span makes TEXCOORD0 shadow TEXCOORD1.y. A synthetic GPU draw produces
[0.25, -0.4, 0.75, 0]instead of[0.25, 0.5, 0.75, 0]. Select packed fields by their actual component mask. Inputs alone in their register retain the existing four-component behavior.What is in it
emit.rs: retain the owned component mask inVsInputFieldand use it when selecting the fetch-shader VGPR source.tests.rs: a GPU regression adapted from #297's packed-input test, with interleaved masks 0x5 / 0x2, distinct values for the overlapping component, and per-pixel output checks.Tested
a5b7825:cargo build --workspaceandcargo test --workspace -- --test-threads=4 --nocapture: 653 passed, 0 failed, 40 ignored.a039d336837920a2bdbf028ff207b4cab3181916:cargo build --workspace, thencargo test --workspace -- --test-threads=4 --nocapture: exit 0; 654 passed, 0 failed, 40 ignored (lib: 614/0/20), including the synthetic-title end-to-end test.git diff --checkpasses.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware),test_title_draws_with_a_root_signature_under_the_debug_layer(no d3d12SDKLayers.dll), anduploads_start_from_each_subresources_state(no D3D12 debug layer).Regression run
Not run on a retail title. This is a draft pending the real-title main/head smoke runs required by CONTRIBUTING.md.
Not tested
AI use
Codex reproduced the GPU failure, wrote the fix and adapted regression, ran the commands, and prepared this description. The exact deployed model identifier is not exposed in this session. No claim of human code review is made.
A console vertex shader whose input signature packs two elements into one register (TEXCOORD0 in .xy and TEXCOORD1 in .zw of r1) declared `float4 a1` once per element in `XclIn`: a member declared twice, which DXC rejects (duplicate member 'a1'), so the pipeline had no VS. Each packed element now gets its own member, `a{register}_{first}`, with the components of its mask; the fetch-shader VGPRs v[b + c] read the element that covers component c (TEXCOORD1.x in the register's z), and a component no element covers reads 0. An element alone in its register keeps `a{register}` as a 4-vector, so the HLSL of every other shader is unchanged. Tests: vs_packed_isg1_inputs_are_members_of_their_own (HLSL, DXC compile) and gpu_vs_packed_isg1_inputs (draw on the GPU with an input layout of separate R32G32 elements). Co-Authored-By: Claude Opus 5.5 <[email protected]>@AC-Storm-YT on GitHub · 2026-11-24 00:25 UTC · original
Test run on AMD RDNA4 – commit
a039d33(this PR's head, as is, not merged withmain, which it currently conflicts with), clean treeTested
backend 'real' – AMD Radeon RX 9070 XT); AMD Ryzen 7 9800X3D; Windows 11 Pro build 26200; Rust 1.100.0stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11cargo build --workspace: okcargo test --workspace -- --test-threads=4: 654 passed, 0 failed, 40 ignored. No SKIPPED tests.gpu_vs_packed_isg1_inputs,gpu_vs_interleaved_isg1_input_masks(GPU),vs_packed_isg1_inputs_are_members_of_their_ownNot tested
smoke.ps1runmainAI use: run and report by Claude Code (Claude Opus 5.5).
@ghost on GitHub · 2026-11-24 00:28 UTC · original
Adding a negative control to AC-Storm-YT's RDNA4 run above, on a second RDNA4 card (RX 9060 XT, driver 32.0.32029.2010, Windows 11 26200, Rust 1.100.0, debug):
a039d33,XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --lib isg1: 4 passed.cecd16fwith this PR'stests.rs:gpu_vs_interleaved_isg1_input_masksfails withpixel (0,0) = [0.25, -0.4, 0.75, 0.0], expected [0.25, 0.5, 0.75, 0.0], the same value as your NVIDIA run. So the test catches the TEXCOORD0 shadowing on AMD too. The other three pass.AI use
@Toons29 on GitHub · 2026-11-25 02:54 UTC · original
Regression run of
a039d336on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 90 % 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.@DavidM1911 on GitHub · 2026-11-25 14:43 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.