fix(recompiler): fill missing pixel interpolators as DEFAULT #6604
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6604"
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 notaxeltv on 2026-10-15T22:32:29Z.
What
When the IR reads a pixel attribute at or past
SPI_PS_IN_CONTROL.NUM_INTERP, fill the missingSPI_PS_INPUT_CNTLslots as DEFAULT (OFFSET0x20) before shader info collection, and emit the same defaults fromGetInterpolationParameterwhen the attribute has no SPIR-V binding (emit rebuilds input info from SPI and would otherwise throwundefined attribute). Component and mode bounds still throw.PPSA03541 (UFC 5) prepares pixel shader
0x114073b400at use withNUM_INTERP0 while it still issuesv_interpon attribute 0.Tested
interpolation_reference_range_testspassed (collector coverage)undefined attribute; this follow-up addresses that emit path (retest after deploy)Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T23:29:58Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/shader.mdL31docs/dev/debt/shader.mdL30-31Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/shader.mdcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/shader/recompiler/Optimization/src/ShaderInfoCollector.cppdocs/dev/debt/shader.mdImported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-17T14:43:18Z.
Intel and AMD Windows data: the new test passes on both GPUs with this change and fails on both without it.
Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
ANYPS5_NO_SHADER_CACHE=1, serial CTest,main47a266cf9. Intel UHD Graphics 770 (8086:a780, 32-wide subgroups), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550, 64-wide subgroups), driver 32.0.31041.1004, withVkCacheemptied first.c32c26edbmerged intomain:interpolation_reference_range, ×3mainwithout the fix, ×3Full CTest (
--parallel 4) with six open PRs merged intomain(#6638, #6604, #6014, #6773, #6772, #6725): the same failures asmainalone on both GPUs, nothing new.mainalone: UHD 770 1392 of 1398, RX 9070 XT 1396 of 1398. The failures are image tables (#6647) andsample_multisample_target(#6971) on Intel, andquad_pixel_mask(#6255) andlayered_volume_vertex_no_gpl(#4768) on AMD.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-17T19:38:58Z.
Windows NVIDIA run of the GPU tests, since the description lists the collector test only.
Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies,
BUILD_TESTING=ON,ANYPS5_NO_SHADER_CACHE=1. Headc32c26edbmerged onto mainf51724078; full build succeeds.interpolation_reference_range,agc_interpolant_mapping,agc_driver_interpolation_modes,agc_driver_interpolation_f16: pass, withANYPS5_REQUIRE_VULKAN=1.ctest -j 8: 1398/1398. Unchanged main on the same machine: 1398/1398.No title run.
AI-assisted: yes (runs done with Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-19T00:51:58Z.
Tested on Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 5090 (driver 617.42), Ryzen 9 9950X3D. Head
c32c26edbmerged onto currentmain(a373e85e5); the merge is clean.interpolation_reference_rangepasses with the change.mainwith only the updated test file it fails withattribute 0 with no SPI inputs becomes a default: shader info collection failed: interpolation parameter reference is out of range (attribute 0 component 0 mode 0, 0 inputs)(and the attribute 5 / 2 inputs case), so the test does cover the new behaviour.Two things I could not settle from the diff:
undefined attribute; this follow-up addresses that emit path"). Nothing here shows that UFC 5 gets past this shader with this change, so the "unblocks title" label is not backed by a run yet. I have no PPSA03541 dump to check.EnsurePixelInterpolatorCoveragemodifiesinputInfo.pixelthroughconst_cast<ShaderPixelInputInfo&>, an object the caller passes as const. If that struct is hashed, serialized or used as part of a cache identity beforeCollectruns, filling ininputNumandinterpolatorSettingsafterwards could make the key differ from what was compiled. Is it only built per compile, or can it be shared? A copy passed down would avoid the question.I am not approving until the title run is shown.
AI-assisted: yes. Written with AI assistance and reviewed by me.
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-19T01:40:24Z.
Tested on a PC with a real title, EA SPORTS UFC 5 (PPSA03541), as a controlled A/B. Both runs used the same base, upstream main
819c5477b, plus #6549, #6563 (resolved against main) and #6572, which UFC 5 also needs. The only difference was this PR.Without this PR: the game aborts at +205 s of the run. The log shows
Shader 0x114073b400 stage 5 ... preparing it at use, thenpresentation failed: shader 0x114073b400 stage 5: ShaderRecompiler::Recompile: shader info collection failed: interpolation parameter reference is out of range (attribute 0 component 0 mode 0, 0 inputs), then SIGABRT (exit 0xC0000409).With this PR: the same shader 0x114073b400 stage 5 is prepared at use (+424.8 s), and the game does not abort. It kept running for the rest of a 1000 s session, with no abort, fatal or driver-failure line in the log.
Caveats: this is one run each, and the abort and shader prepare times differ because I played to the match by hand. The game is still very slow after this point (about 0.2 to 2 fps), which is a separate problem this PR does not touch. I did not run the unit tests as part of this check.
AI-assisted: yes. Written with AI assistance and reviewed by me.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-19T03:22:13Z.
Thanks, the fix is scoped well: it only changes shaders that fail to compile on main today. Two things before merge:
Please remove the game title, the PPSA id and the shader address from the
docs/dev/debt/shader.mdline. Debt entries describe the behaviour, not a specific game. Title-specific notes belong in the Game bring-up discussion. Something like "a pixel shader can be prepared withNUM_INTERP0 while it still issuesv_interpon attribute 0" keeps the useful part.The emitter change in
c32c26edb(the default for an attribute pastinputNumor without a SPIR-V binding) isn't covered by a test. Nothing fails if it's reverted. Could you add a case that runs SPIR-V emission ofGetInterpolationParameterfor an attribute pastinputNum(and one with no binding) and checks the P0 default and zero deltas? InInterpolationReferenceRange.cpp, it would also help to assert the outcome (the filled slots read as DEFAULT and no parameter input is added) rather than only the absence of one error message.Minor, no change needed:
InterpolateHostP1/P2are lowered before info collection, so those two cases inEnsurePixelInterpolatorCoveragenever fire. And a 16-bit high-half read pastNUM_INTERPstill fails during emission (as it does on main).Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T16:51:31Z.
We merged current main and reworded the debt entry so it names no title; no code change.