renderer: fix cache accounting and eviction scans under memory pressure #977
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!977
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/977/head"
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?
@tototomate123 on GitHub · 2026-10-02 14:30 UTC · original
tototomate123:fix/cache-memory-pressure→main· +47 −14 · 3 files · 2 commits · closed without mergingTwo cache fixes found while investigating HFW memory pressure, in separate commits:
Reference: VMA allocation statistics versus driver usage/budget.
Validation: Linux/Clang build and buffer/texture cache checks pass. The regression with twelve protected textures before one reclaimable texture fails without the scan fix and passes with it.
AI-assisted implementation.
@coderabbitai[bot] on GitHub · 2026-10-02 14:54 UTC · original
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
6e395995-3f9a-402f-b287-f170c333576f📥 Commits
Reviewing files that changed from the base of the PR and between
e317465d8aand8dd843e6ab.📒 Files selected for processing (3)
src/graphics/host_gpu/renderer/cache/bufferCache.cppsrc/graphics/host_gpu/renderer/cache/textureCache.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Walkthrough
BufferCache and TextureCache now use reported device memory usage for garbage-collection thresholds when available, with cache-owned bytes as a fallback. TextureCache also filters candidates based on image and pressure conditions, then updates its local usage estimate after freeing an image. A new test checks that collection removes the final texture in a set of 13 while retaining the first 12.
Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
8dd84No actionable issue remains from this review; the change is mergeable after normal checks.
Security Architecture Review
Security architecture risk: ⚪ Minimal · up to
8dd84The changes correct allocation accounting and prevent protected textures from hiding reclaimable entries. The inspected changes preserve resource-ownership checks and retirement controls, without introducing new entrypoints or privileges.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❓ 1
❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 too large.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed