refactor(recompiler): share the SPIR-V emission failure helper #832
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/832"
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 MathiasDevelopes on 2026-10-06T08:13:43Z.
What
Nine SPIR-V backend sources each defined the same helper in an anonymous namespace:
FailEmitis declared once inSpirvEmitterHelpers.hppand defined inSpirvEmitterHelpers.cpp; the exception type and message are unchangedSpirvBufferAccess.cpp,SpirvConstants.cpp,SpirvDescriptors.cpp,SpirvFormatConvert.cpp,SpirvInputOutput.cpp,SpirvModuleSetup.cpp,SpirvSubgroup.cppandSpirvTypes.cppare removedSpirvEmitterHelpers.hppnow include itSpirvConstants.cppandSpirvFormatConvert.cppthe anonymous namespace held onlyFailEmitand is removedNo behaviour change.
Tested
Linux, GCC 13.3. No title tested; the full build and
ctestwere not run.-std=c++20 -Wall -Wextra -fsyntax-onlyagainst the pinned SPIRV-Headers (01e05779); the only warning (SpirvBufferAccess.cpp:118,-Wextraenum/non-enum conditional) is unchanged by this PRFailEmitis defined once in the repository, in a source the recompiler target already buildsChecklist
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)Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-06T08:13:49Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by MathiasDevelopes on 2026-10-07T06:06:34Z.
Rebased onto latest
main(now a single commit on top ofa9ec7be2).There was one conflict in
SpirvFormatConvert.cpp:mainadded a newUnormToF32Bitshelper in the same anonymous namespace as the file's localFailEmitcopy. I keptUnormToF32Bitsand dropped the localFailEmit, so the file now uses the shared one fromSpirvEmitterHelpers.hpplike the rest of the SPIR-V backend. No other changes.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T07:34:18Z.
Checked: the nine removed copies are identical to the shared one (same exception type and message), one definition left in
core/shader; full build + ctest (385/385) on the PR merged onto currentmain, no newFailEmitcopies in other open PRs. Merging.