Repository navigation
fix(shader): preserve aliased embedded fetch attributes - #3258
Merged
oneandonlydean merged 1 commit intoOct 11, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
8 tasks done
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.
Carried unchanged from @Scramblrrrr's branch (
d5a396d9, authorship kept) in place of #2480: GitHub can't reopen that PR because its branch was force-pushed after the intake close.What
An embedded vertex fetch can load a four-dword buffer descriptor into the same scalar registers that hold its attribute-table offset. The scanner clears each destination before reading the source offset's metadata. For
s_load_dwordx4 s[0:3], s[20:21], s0, this loses the attribute id and load provenance, then registration fails withprepared vertex fetch has no matching semantic.Snapshot the source attribute before writing any descriptor words. Every destination retains the same attribute id and the original attribute-table load followed by the descriptor load. No instruction semantics, fallback, resource limits or validation rules change.
Add a synthetic decoded shader regression for wave32 and wave64. It checks offsets held in each overlapping register s0-s3 and in non-overlapping s16, the attribute id, component count, fetch PC, and both prolog-load PCs. The baseline fails for the s0 overlap in both wave sizes; the fixed version passes.
The trigger was a diagnostic run of 007 First Light (PPSA11386), after 523 shader-cache writes. Its captured 944-word vertex program reproduces the error in
agc_shader_replay --prepare; with this change it prepares and validates into 80,493 SPIR-V words. No title code, assets, executable, requests or private dumps are included. This does not establish title playability: no first frame has been verified, and the local diagnostic runtime still uses a Share Play debugger bypass.Tested
Rebased onto upstream
a29ef592190d0450eacbde15ec8e228e379ed753; branch headd5a396d92760c40bdbf0b8857e78d18b7e6a00b4. Windows 11, Ryzen 7 7800X3D, RTX 5070 Ti, Release MinGW GCC 15.2, SPIRV-Tools OFF.The relevant checks (agc_embedded_vertex_fetch_aliasing) pass in a combined validation checkout containing the independently rebased reciprocal, shared-loop-exit, vertex-fetch-aliasing, table-store, SRT-depth, constant-phi and deferred-specialization topics. All 10 selected CTest cases passed in 2.31 seconds, with Vulkan required for the table-store execution regression. Each public branch contains its own topic only; these are combined-checkout results, not seven separate full builds. Conventions and diff checks pass for each branch.
No fresh game run, visible frame or playable gameplay is claimed for these rebased heads. Earlier reduced-regression and local-title observations motivated the original change; title code and captures remain local. Linux and macOS were not rerun locally for this rebase.
Checklist
a29ef592; one topic per branch