fix(build): preserve bundled validator type tables through exit #6476
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6476"
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 JJenkx on 2026-10-15T16:39:31Z.
What
Keep the bundled SPIRV-Tools validator's type-operand opcode tables alive during process exit.
InstructionCanHaveTypeOperandandInstructionRequiresTypeOperandcurrently use function-localunordered_sets. A callback registered before their first use can validate after their destructors have run.Extend the existing guarded build-source patch mechanism to replace those two sets with constant arrays and
std::find, preserving the opcode lists. Both bundled static and shared validator targets use the generated source. Unexpected upstream source changes fail configuration for review. The vendored source and dependency gitlinks remain unchanged; system-package builds are outside this repair.Add a regression that validates a valid function, valid Phi control flow, and an invalid function type before and during exit. This addresses a specific validator lifetime defect, not every title shutdown fault. No performance or title-unblock claim.
Tested
Arch Linux, Linux 7.2.9-arch1-1, Ryzen 9 7950X. Final source
4187f0b72c31b472dc1103b24f819b5d6f603d8c, rebased on current mainec1193dc3. Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON, ANYPS5_USE_SYSTEM_DEPS=OFF. Official SPIRV-Tools pin7f2d9ee926f98fc77a3ed1e1e0f113b8c9c49458; no private dependency commit.libstarget and seven focused SPIR-V test executables built successfully.agc_driver_f16_to_f32_unpackGPU execution andagc_driver_f16_to_f32_unpack_spirvchecks passed on both RADV and lavapipe (2/2 each, no skips).87c2a1d32a14d04b756c362146f0f4d615075b8bdaa614dac453f582964b5158across all variants; the linked executable is rebuilt for each validator variant.407de2d78fec6d840ca495be54cc291de07dc52bon0029e62f9, also with the official dependency pin. The intervening main changes are libc formatting/math fixes; the final rebased source was rebuilt and its focused checks rerun. This is not a performance comparison or gameplay validation.Windows and system-dependency builds have not been tested locally. The separate dependency bump in #5319 does not replace this fix: the v2025.5 validator still uses these dynamic tables; combining the two branches has not been built locally.
Manual review of the overlap bot's unavailable comparisons: #1341 (
5380bb9325) adds an SRT source file to the target; #1896 (ae7542cde8), #5867 (a2b5009f55) and #5925 (3339ddd3af) extend shader-cache guard-name lists. Their changes to the shared recompiler CMake file do not register this exit regression or patch the validator. None duplicates this repair. The later #6454 warning was also inspected at7f7d4064c8: its shared CMake change addsLoadStampto the cache guard-name list and does not alter validator patching or test registration. Their other conflicts with main remain unresolved in those PRs; combined builds were not performed.Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T16:53:15Z.
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.
core/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txtcore/shader/recompiler/CMakeLists.txt