test(agc): inspect vector windows before optimization #4182
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4182"
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 MarcZX10 on 2026-10-12T00:51:48Z.
What
agc_vector_windowinspects the emitted SPIR-V to check that relative VGPR accesses use a function-scope window array and access chains. The fixture has no observable shader output, so the default optimizer removes the window before the structural assertion examines it, reporting zero arrays and access chains.Run this structural lowering test with
APS5_SPIRV_OPT=none, preserving its input for inspection. This change is limited to the vector-window assertion. Open PR #4177 separately fixes the registered-workgroup lane-63 fixture, the other failure reported in #4167.Tested
BUILD_TESTING=ON, andANYPS5_ENABLE_SPIRV_TOOLS=ONcompleted.agc_vector_window_testswith Ninja.ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir /tmp/AnyPS5-4167-build -R '^agc_vector_window$' --output-on-failure --timeout 120passed (1/1).python3 tools/check_conventions.py --base upstream/main --head HEADpassed.git diff --checkpassed.Checklist
main; no other open PR implements the same changeNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T01:09:17Z.
#4182:
agc_vector_windowis a real registered test,APS5_SPIRV_OPT=noneis a real optimizer-disable switch read inSpirvOptimizer.cpp, andAPPENDis the right call — it preserves the test's existingANYPS5_NO_SHADER_CACHE=1environment entry rather than replacing it, matching how this file already appends to other tests' environments. Without this the test strips the window before its own structural assertion can see it and genuinely fails (functionArrays==1etc. all false), not silently passes against a weaker check.#3883: the stub follows this file's own pattern exactly (
NotImplemented_nid_no_patch, matching the sibling declared right above it), and the NID is independently re-derivable in-tree —ComputeNid("sceAgcDriverGetHsOffchipParam")reproducesr28hEh6cNH0using this project's own hash function, not an external lookup. One thing worth being plain about: the signature (twouint16_t*outputs) comes entirely from a third-party reverse-engineering project (ps5-vulkan), not from anything in this tree or from hardware — nothing here corroborates it, and the only related in-tree function, the settersceAgcDriverSetHsOffchipParam, takes threeuint64_tby value, which doesn't confirm or contradict it either way. The TechnicalDebt entry is honest about that ("unknown"), which is the right call given the evidence.One thing to flag before merging: open PR #3648 also edits the same block of
docs/dev/TechnicalDebt.mdthis PR appends to, which isn't listed in the "Depends on" line — worth a quick check for a textual conflict on whichever lands second.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T01:18:01Z.
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)core/libs/prx/libSceAgcDriver/CMakeLists.txtL1060core/libs/prx/libSceAgcDriver/CMakeLists.txtL1060core/libs/prx/libSceAgcDriver/CMakeLists.txtL1060Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T07:36:31Z.
Closing: #4057 made the
agc_vector_windowfixtures observable, so the test passes on main with the optimizer on. If it still fails on current main, please reopen.Pull request closed