mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #3350] [MERGED] video_core: garbage collector (part 1) #3406
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3406
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3350
Author: @LNDF
Created: 7/30/2025
Status: ✅ Merged
Merged: 8/6/2025
Merged by: @LNDF
Base:
main← Head:gc📝 Commits (10+)
5c39b7fMemory information0b764bcBuffer cache GC59c1691Texture cache GCed3a475Fix ChangeRegister527b99fBetter image touching0468787Buffer async download on GC destroyc576a1eHandle image download, SKIP NON-LINEAR WORKAROUND5863735Only download when not dirtyba137aaCorrectly handle BDA pagefile update35e12b9Restructure ChangeRegistration📊 Changes
14 files changed (+508 additions, -29 deletions)
View changed files
📝
CMakeLists.txt(+1 -0)➕
src/common/lru_cache.h(+135 -0)📝
src/video_core/amdgpu/liverpool.cpp(+1 -1)📝
src/video_core/buffer_cache/buffer.h(+9 -0)📝
src/video_core/buffer_cache/buffer_cache.cpp(+120 -22)📝
src/video_core/buffer_cache/buffer_cache.h(+19 -1)📝
src/video_core/page_manager.cpp(+1 -0)📝
src/video_core/renderer_vulkan/vk_instance.cpp(+62 -0)📝
src/video_core/renderer_vulkan/vk_instance.h(+23 -1)📝
src/video_core/renderer_vulkan/vk_rasterizer.cpp(+3 -1)📝
src/video_core/renderer_vulkan/vk_rasterizer.h(+1 -1)📝
src/video_core/texture_cache/image.h(+6 -0)📝
src/video_core/texture_cache/texture_cache.cpp(+100 -0)📝
src/video_core/texture_cache/texture_cache.h(+27 -2)📄 Description
The intent is to implement a garbage collector for GPU resources.
This garbage collector is based on the yuzu implementation.
For anyone testing, you are noit suposed to see any inmediate effects upon launching the game. This is a garbage collector, and the goal is to delete OLD_DATA (😉) from GPU in order to keep memory usage under control.
A note regarding DMA: Due to how DMA is currently implemented, garbage collection will not work on buffers on games that make use of DMA. This is because current DMA implementation syncs all buffers, touching them all. Referencing my other DMA PR (#3197) since it could be solved there.
Checklist:
* The texture cache will not garbage collect non-linear GPU modified images. This will be fixed in a future PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.