Skip to content

refactor(recompiler): share the stage input info helpers - #1069

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
LeandroLP23:refactor/spirv-shared-input-helpers
Oct 7, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
LeandroLP23:refactor/spirv-shared-input-helpers

Conversation

@LeandroLP23

Copy link
Copy Markdown
Contributor

What

Four helpers were defined with identical bodies in the anonymous namespaces of several SPIR-V backend sources:

Helper Copies
StageOf SpirvModuleSetup.cpp, SpirvInputOutput.cpp, SpirvDescriptors.cpp
PixelInfo SpirvModuleSetup.cpp, SpirvInputOutput.cpp, SpirvEmitterHelpers.cpp
VertexInfo SpirvModuleSetup.cpp, SpirvInputOutput.cpp
ShaderWorkgroupInput SpirvModuleSetup.cpp, SpirvBufferAccess.cpp
  • They are declared once in SpirvEmitterHelpers.hpp, next to FailEmit (refactor(recompiler): share the SPIR-V emission failure helper #832), which they call, and defined in SpirvEmitterHelpers.cpp; bodies and messages are unchanged
  • The 9 copies are removed; in SpirvModuleSetup.cpp the anonymous namespace held only these four and is removed
  • All changed sources already include SpirvEmitterHelpers.hpp

No behaviour change.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release with BUILD_TESTING=ON, on main 80d4f6b. No title or homebrew.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

StageOf, VertexInfo, PixelInfo and ShaderWorkgroupInput were defined
in the anonymous namespaces of up to three SPIR-V backend sources with
identical bodies; they are now declared next to FailEmit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the shader core/shader label Oct 7, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked that the moved bodies and messages match the removed copies and that no other copy is left; build and ctest (395/395) green on the PR merged onto current main, CI green. Merging, thanks.

@adriadam10
adriadam10 merged commit 62ffd1e into boykopovar:main Oct 7, 2026
3 checks passed
@LeandroLP23
LeandroLP23 deleted the refactor/spirv-shared-input-helpers branch October 10, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants