[PR #3396] video_core: garbage collector (part 2) #3436

Open
opened 2026-02-27 22:03:41 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3396
Author: @LNDF
Created: 8/6/2025
Status: 🔄 Open

Base: mainHead: gc2


📝 Commits (10+)

📊 Changes

13 files changed (+364 additions, -97 deletions)

View changed files

📝 src/video_core/buffer_cache/buffer.cpp (+27 -0)
📝 src/video_core/buffer_cache/buffer.h (+48 -0)
📝 src/video_core/buffer_cache/buffer_cache.cpp (+103 -28)
📝 src/video_core/buffer_cache/buffer_cache.h (+21 -4)
📝 src/video_core/buffer_cache/memory_tracker.h (+25 -0)
📝 src/video_core/buffer_cache/range_set.h (+3 -3)
📝 src/video_core/page_manager.h (+4 -0)
📝 src/video_core/renderer_vulkan/vk_instance.h (+2 -1)
📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+14 -7)
📝 src/video_core/renderer_vulkan/vk_shader_hle.cpp (+11 -2)
📝 src/video_core/texture_cache/image.h (+3 -1)
📝 src/video_core/texture_cache/texture_cache.cpp (+95 -45)
📝 src/video_core/texture_cache/texture_cache.h (+8 -6)

📄 Description

This is a contiuation of #3350.

This will implement non-linear GPU modified image collection without losing the GPU modifications. This will reduce memory leaks even further (for example, in Bloodborne).

Currently, this depends on #3374 which implements tilers, required for non-linear image download.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3396 **Author:** [@LNDF](https://github.com/LNDF) **Created:** 8/6/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `gc2` --- ### 📝 Commits (10+) - [`22e103b`](https://github.com/shadps4-emu/shadPS4/commit/22e103b033d7f87afb591ff18ec6693e6818306d) Use general dirty flag - [`0f70970`](https://github.com/shadps4-emu/shadPS4/commit/0f70970442f9b72c9356fced489d7066eff84890) clang-format - [`dff3048`](https://github.com/shadps4-emu/shadPS4/commit/dff30484a57476ffa9dcb41522025697cacf7b04) Handle non-linear image download - [`d9958de`](https://github.com/shadps4-emu/shadPS4/commit/d9958dedc4f98afa13b980614ceb8f36e9bd11b9) Layout transition - [`58b5618`](https://github.com/shadps4-emu/shadPS4/commit/58b5618c558b1df613965656457d370b970800ff) Invalidate buffer cache memory on image download - [`5b8057d`](https://github.com/shadps4-emu/shadPS4/commit/5b8057da4ce0df3918e3b1776d57215af439ebb4) Sync texture downloads - [`9d267be`](https://github.com/shadps4-emu/shadPS4/commit/9d267bec2cf94ac64e3af20b84d32dabd94b0c07) Correctly capture arguments - [`a8cd9e3`](https://github.com/shadps4-emu/shadPS4/commit/a8cd9e359ce7555941432e84d36842cfb4de1e15) Account for big downloads - [`a63d1da`](https://github.com/shadps4-emu/shadPS4/commit/a63d1daa00be6b292bf292112f4e6a215d37ea97) (test) image gpu dirty - [`542b8fe`](https://github.com/shadps4-emu/shadPS4/commit/542b8feda99603a1648c37bba2d03d24d0654463) Revert "(test) image gpu dirty" ### 📊 Changes **13 files changed** (+364 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/buffer_cache/buffer.cpp` (+27 -0) 📝 `src/video_core/buffer_cache/buffer.h` (+48 -0) 📝 `src/video_core/buffer_cache/buffer_cache.cpp` (+103 -28) 📝 `src/video_core/buffer_cache/buffer_cache.h` (+21 -4) 📝 `src/video_core/buffer_cache/memory_tracker.h` (+25 -0) 📝 `src/video_core/buffer_cache/range_set.h` (+3 -3) 📝 `src/video_core/page_manager.h` (+4 -0) 📝 `src/video_core/renderer_vulkan/vk_instance.h` (+2 -1) 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+14 -7) 📝 `src/video_core/renderer_vulkan/vk_shader_hle.cpp` (+11 -2) 📝 `src/video_core/texture_cache/image.h` (+3 -1) 📝 `src/video_core/texture_cache/texture_cache.cpp` (+95 -45) 📝 `src/video_core/texture_cache/texture_cache.h` (+8 -6) </details> ### 📄 Description This is a contiuation of #3350. This will implement non-linear GPU modified image collection without losing the GPU modifications. This will reduce memory leaks even further (for example, in Bloodborne). Currently, this depends on #3374 which implements tilers, required for non-linear image download. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3436
No description provided.