fix(agc): read zero for pixel inputs whose parameter the vertex shader never exports #3336
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3336"
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?
Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T08:06:16Z.
What
Fixes #2975.
Cause: a pixel shader may read a parameter that the draw's vertex shader never exports. Rect-list draws already handle this (their generated stages pass zero, as from an unwritten parameter cache entry), but an ordinary vertex to pixel draw fails
ValidateShaderswithgraphics interfaces disagree at location N (stage 0 output missing …).Fix: for a plain vertex to pixel draw, the pixel stage is compiled with
DefaultUnexportedPixelInputs. EverySPI_PS_INPUT_CNTLentry whose slot the compiled vertex shader does not export becomes a default-value input (OFFSETbit 5 set,DEFAULT_VAL0), which the recompiler already lowers to the constant (0, 0, 0, 0) rather than an interface input, as @Silverash-i8 suggested in #2975. Inputs that are already defaults, and 16-bit inputs, are left unchanged. Tessellation, geometry and rect-list paths are untouched.Tested
CachyOS (Linux 7.2), RTX 4090, NVIDIA 615.78, GCC Release.
unexportedPixelInputTestsinagc_driver_graphics(exported, unexported, default and 16-bit inputs).ctest -R '^agc': 358/359; the failure isagc_driver_dcc_keys_first_write, which fails onmainon NVIDIA (#2188).tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Tested and written by Claude (AI assistant) on a contributor's machine.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T08:07:49Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T08:12:48Z.
Windows run for whoever carries this:
0a24c5c2merged onto currentmain(which now has #3324), Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop. Allagc_*tests pass, 358/358, includingagc_driver_graphicswith the newunexportedPixelInputTests. With #3324 in,agc_driver_dcc_keys_first_writepasses too, so there's no failure left in that set on Windows.Thanks for implementing the default-value route from #2975, and good to see it gets Guardians of the Galaxy past the same stop.
AI-assisted (Claude Code); I ran this on my machine.
Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-11T14:32:17Z.
@Tamalero Wolverine data for this change, and a note on intake:
pr-intake.ymlnow allows up to 20 open PRs to anyone with at least one merged PR, so this can be reopened (or resubmitted) as is. If you'd rather not, I can carry it with you as the author.Setup. Marvel's Wolverine (PPSA03671), Windows 11, RTX 3070, GCC 15.2.0 UCRT, Release. Main
a11c8f7f7+ #757 + #3588 + #3633 + this PR at0a24c5c2(merges cleanly on that main).graphics interfaces disagree at location 0 (stage 0 output missing, stage 1 input vertex:f32x4; previous outputs:; parameter exports:; fragment parameters: 0<-0). This is the draw from #2975 (VS0x11d00bd000exports only the position, FS0x11d015f100reads param 0,SPI_PS_INPUT_CNTL_0= 0).AI-assisted: yes (Claude Code)
Pull request closed