renderer: preserve GPU-authored storage images during GC #373

Open
github-bot wants to merge 1 commit from github-bot/gh-373 into main AGit
Owner

@⁠Techx3 on GitHub · 2026-08-28 23:01 UTC · original
Techx3:techx3/texture-gc-preserve-gpu-storage → main · +72 −0 · 2 files · 1 commits · open

Summary

  • retain GPU-modified storage-only images whose authoritative contents remain in host GPU memory
  • exclude protected entries while filling the bounded LRU deletion batch
  • verify both data retention and forward GC progress after 20 protected entries

Why

Pressure GC can otherwise clear and delete a GPU-authored storage image without publishing its only current contents to guest memory. The next use is then reconstructed from stale or empty guest data, producing black or corrupted textures.

This isolates and hardens the GC part of #266. Unlike the original traversal, it keeps the candidate vector bounded and prevents protected images from starving a later evictable image.

Game / PPSA context

  • Scars Above — PPSA08597 (storage-image and black-world investigation)
  • Demon's Souls — PPSA01342 (texture/color corruption investigation)

Validation

  • built: kyty_emulator, shader_recompiler_compute_tests
  • passed: texture_cache_image_overlap
  • passed: shader_recompiler_compute
  • git diff --check

Co-authorship preserves credit for the original #266 change and the hardened regression work.

**@⁠Techx3** on GitHub · 2026-08-28 23:01 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/373) `Techx3:techx3/texture-gc-preserve-gpu-storage` → `main` · +72 −0 · 2 files · 1 commits · open ## Summary - retain GPU-modified storage-only images whose authoritative contents remain in host GPU memory - exclude protected entries while filling the bounded LRU deletion batch - verify both data retention and forward GC progress after 20 protected entries ## Why Pressure GC can otherwise clear and delete a GPU-authored storage image without publishing its only current contents to guest memory. The next use is then reconstructed from stale or empty guest data, producing black or corrupted textures. This isolates and hardens the GC part of #266. Unlike the original traversal, it keeps the candidate vector bounded and prevents protected images from starving a later evictable image. ## Game / PPSA context - Scars Above — PPSA08597 (storage-image and black-world investigation) - Demon's Souls — PPSA01342 (texture/color corruption investigation) ## Validation - built: kyty_emulator, shader_recompiler_compute_tests - passed: texture_cache_image_overlap - passed: shader_recompiler_compute - git diff --check Co-authorship preserves credit for the original #266 change and the hardened regression work.
Keep storage-only images whose authoritative contents remain on the GPU. Skip those protected entries while selecting the bounded LRU batch so they cannot starve a later evictable image.

Co-authored-by: shadowbeat070 <[email protected]>

Co-authored-by: SueryRD <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:18:14 +00:00
This pull request has changes conflicting with the target branch.
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/373/head:github-bot/gh-373'
git switch 'github-bot/gh-373'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-373'
git switch 'github-bot/gh-373'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-373'
git switch 'github-bot/gh-373'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-373'
git switch 'main'
git merge --squash 'github-bot/gh-373'
git switch 'main'
git merge --ff-only 'github-bot/gh-373'
git switch 'main'
git merge 'github-bot/gh-373'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.