Repository navigation
fix(shader): ignore interpolator settings past the programmed count - #23952
oneandonlydean merged 1 commit into
Conversation
ShaderInputInfoBuilder copied all 32 SPI_PS_INPUT_CNTL settings into the pixel input info. An interpolation read of an attribute at or beyond the programmed count then took its default value from a setting the hardware never consults, while the recompile cache keys hash only the programmed settings. Two pixel stages that differ only past the count compiled to different SPIR-V under one key, so the disk cache could serve either. Mesa (radeonsi, RADV), PAL and LLPC program SPI_PS_INPUT_CNTL only below NUM_INTERP, and no source defines a read past it. ShaderInfoCollector already treats such reads as the zero default. The builder now copies only the programmed settings and leaves the rest zero, so every reader agrees with the count-gated keys.
|
NVIDIA run of the Tested selection plus the interpolation tests: no regression. Setup: RTX 3070 8 GB, NVIDIA 610.57.04, Ryzen 5 5600X, Debian 13 (kernel 6.12.115), GCC 13.3.0 Release, validation layer 1.4.335. Base is the merge-base 9b11f42, head is 56a33da.
Every run selects the RTX 3070; every Vulkan test's log shows the layer inserted, none reports it missing, and no log has a AI-assisted: yes |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the implementation matches the count-gated cache key and existing zero-default handling.
What I ran
Reviewed head 56a33daf8641fb9cbbb131d1111bd93cfec52900. I inspected the prepared diff and source context using repo_read.py; no tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and source review | passed | Both changed files inspected |
| Tests | not run | CI results are author-reported |
| Negative control | not run | Author-reported only |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was read only around the added test and its invocation, not in full; the modified ShaderInputInfoBuilder.cpp lines and relevant collector, input-info, and SPIR-V caller context were read. Graphics.cpp was excluded from the prepared review folder because it was too large. I did not run tests or independently verify the author-reported CI or negative-control results.
To get this to a good state
Nothing is required.
|
Some 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.
|
|
First AMD hardware run for this, on the Tested selection plus the other interpolation tests. No regression, and the mesh case that fork CI skips runs here. Setup: Windows 10 22H2, AMD Radeon RX 9070 XT (RDNA4,
AI-assisted: yes (Claude Code) |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
|
Windows run on RTX 50 and an RDNA2 iGPU, with a red check. Head Setup: Windows 11 Enterprise 10.0.26300, Ryzen 7 9800X3D, WinLibs GCC 15.2.0, Release. NVIDIA GeForce RTX 5090 (
Every layer log of a test that opens a Vulkan instance shows GPUs tested: NVIDIA GeForce RTX 5090, driver 617.42, Windows 11; AMD Radeon(TM) Graphics (Ryzen 7 9800X3D iGPU), driver 32.0.21045.29003, Windows 11 AI-assisted: yes |
|
Tested on Intel Arc B390 (Mesa 26.2.7 ANV, Linux 7.2.10), PR head
AI-assisted: yes (Claude Code) |
What
ShaderInputInfoBuildercopied all 32SPI_PS_INPUT_CNTLsettings into the pixel input info. An interpolation read of an attribute at or beyond the programmedinterpolatorCountthen took its default value from a setting the hardware never consults, while the recompile cache key (CacheKey.hpp) hashes only the settings below the count. Two pixel stages that differ only past the count compiled to different SPIR-V under one key, so the shader disk cache could serve either one.Mesa (radeonsi, RADV), PAL and LLPC program
SPI_PS_INPUT_CNTLonly belowNUM_INTERP, and no source defines a read past it.ShaderInfoCollectoralready treats such reads as the zero default. The builder now copies only the programmed settings and leaves the rest zero, so every reader agrees with the count-gated key. +4 lines, -3 inShaderInputInfoBuilder.cpp, plus a test intests/Graphics.cpp(interpolatorSettingsPastCountTests) that recompiles five count/setting pairs and requires equal cache keys to give equal SPIR-V and the programmed cases to stay distinct.Tested
agc_driver_graphics,agc_driver_provoking_vertex,agc_driver_pixel_barycentric_emulation,agc_driver_mesh_provoking_vertex,agc_shader_disk_cache: 4 passed, 1 skipped (agc_driver_mesh_provoking_vertex, skipped the same on main), no new VUIDs, same results as main: https://github.com/chitters2004/AnyPS5/actions/runs/44628382591draft/shader-interpolator-past-count-control):agc_driver_graphicsfails on both Linux and Windows, passes on main without the test: https://github.com/chitters2004/AnyPS5/actions/runs/43377226512Checklist
main(9b11f42); 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)🤖 Generated with Claude Code