Skip to content

perf(agc): keep up to 1024 cached pipelines - #2175

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:up639/pipeline-cache-bound
Oct 9, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:up639/pipeline-cache-bound

Conversation

@oneandonlydean

Copy link
Copy Markdown
Collaborator

What

CachedPipeline's LRU bound goes from 256 to 1024 pipelines. A cached pipeline is a pure function of its key, so only memory and time change.

Why

A level whose draws use more than 256 pipelines thrashes the LRU, and every miss creates a new VkPipeline (modules, layout, render pass and a driver compile). Since #639 shaders are compiled at registration, but pipelines are still created on demand here.

Tested

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

CachedPipeline keeps at most 256 pipelines. A level with a larger working
set thrashes the LRU: every miss creates a new VkPipeline (modules,
layout, render pass and a driver compile from the pipeline cache). The
bound is now 1024. A cached pipeline is a pure function of its key, so
the bound changes only memory and time.
@github-actions github-actions Bot added the agc libSceAgc* label Oct 9, 2026
@popcoder565

Copy link
Copy Markdown
Contributor

Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 954864ea, merged onto main d70b899 in one build with 33 other AGC/shader PRs that had no Windows run.

No title was run.

🤖 Addressed by Claude Code

@oneandonlydean
oneandonlydean merged commit 05963a6 into boykopovar:main Oct 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants