Repository navigation
Recompiler: preserve interleaved packed VS input components - #309
Draft
likecrank-dotcom wants to merge 2 commits into
Draft
likecrank-dotcom wants to merge 2 commits into
likecrank-dotcom wants to merge 2 commits into
Conversation
…eir own (ivall#105) 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 <noreply@anthropic.com>
Select a packed attribute by its actual component mask so TEXCOORD0.xz cannot shadow TEXCOORD1.y. Preserve all four components for unshared input registers. Add a GPU regression adapted from the packed-input test in ivall#297. Assisted-by: Codex (exact model identifier unavailable)
|
Test run on AMD RDNA4 – commit Tested
Not tested
AI use: run and report by Claude Code (Claude Opus 5.5). |
|
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):
AI use
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked 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 Recompiler: VS inputs packed into one ISG1 register are members of their own (#105) #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.