Skip to content

Vulkan pipeline cache: finish preload state before profile-mismatch early return#4106

Open
collinmcg wants to merge 1 commit intoshadps4-emu:mainfrom
collinmcg:jane/pipeline-cache-preload-finish
Open

Vulkan pipeline cache: finish preload state before profile-mismatch early return#4106
collinmcg wants to merge 1 commit intoshadps4-emu:mainfrom
collinmcg:jane/pipeline-cache-preload-finish

Conversation

@collinmcg
Copy link
Copy Markdown

@collinmcg collinmcg commented Mar 6, 2026

This fixes a cache lifecycle edge case in PipelineCache::WarmUp().

If the stored pipeline profile doesn't match the current system profile, we currently return early. In archive mode that leaves cache DB state in preload/read-only mode for the rest of the run, while runtime registration paths can still call DataBase::Save(...).

The change is just:

  • call Storage::DataBase::Instance().FinishPreload() in the mismatch branch
  • keep the same behavior otherwise (still ignore incompatible warmup cache)

So this is not changing compatibility logic, only cleaning up DB state before continuing.

Validation on my side:

  • walked the control flow from WarmUp() to RegisterShader*/RegisterPipelineData save paths
  • local configure succeeds
  • full local build currently fails in unrelated external code (externals/openal-soft) in this environment

@red-prig
Copy link
Copy Markdown
Contributor

red-prig commented Mar 7, 2026

What's the point of save an incompatible cache? Explain in practical terms.

@collinmcg
Copy link
Copy Markdown
Author

It doesn’t save incompatible cache for use; it lets newly rebuilt compatible cache actually get written after a mismatch so later runs are smoother instead of recompiling again.

@red-prig
Copy link
Copy Markdown
Contributor

red-prig commented Mar 7, 2026

I looked through the code in more detail, oddly enough, your edit makes sense, but not for the reasons you indicated, the AI ​​is simply lying to you.

@red-prig
Copy link
Copy Markdown
Contributor

red-prig commented Mar 7, 2026

session may still be called and expects writable archive state.
the first comment was right

@collinmcg
Copy link
Copy Markdown
Author

That's what I get for intervening I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants