[PR #3593] [MERGED] texture_cache: Make sure that readback images are downloaded in time #3597

Closed
opened 2026-02-27 22:04:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3593
Author: @squidbus
Created: 9/13/2025
Status: Merged
Merged: 9/13/2025
Merged by: @squidbus

Base: mainHead: readback-img


📝 Commits (1)

  • 381dac3 texture_cache: Make sure that readback images are downloaded in time

📊 Changes

3 files changed (+59 additions, -10 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+3 -2)
📝 src/video_core/texture_cache/texture_cache.cpp (+36 -7)
📝 src/video_core/texture_cache/texture_cache.h (+20 -1)

📄 Description

Use a thread for deferring copying readback images to memory, instead of a scheduler deferred operation, to make sure that the copy executes in time for the guest to see.

Ratchet & Clank (2016) was hanging on load because it was stalling the main thread expecting a shadow-related image to be read back from the GPU, but the actual memory copy deferred operation did not execute yet. With a thread in the background making sure the copy happens when the tick is reached, instead of whenever the scheduler is next updated to pop deferred operations, the game now progresses without any patches (with readback and readbackLinearImages enabled).


🔄 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/3593 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/13/2025 **Status:** ✅ Merged **Merged:** 9/13/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `readback-img` --- ### 📝 Commits (1) - [`381dac3`](https://github.com/shadps4-emu/shadPS4/commit/381dac3bf74390cd2517671d3c7fe85d7936a9d9) texture_cache: Make sure that readback images are downloaded in time ### 📊 Changes **3 files changed** (+59 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+3 -2) 📝 `src/video_core/texture_cache/texture_cache.cpp` (+36 -7) 📝 `src/video_core/texture_cache/texture_cache.h` (+20 -1) </details> ### 📄 Description Use a thread for deferring copying readback images to memory, instead of a scheduler deferred operation, to make sure that the copy executes in time for the guest to see. Ratchet & Clank (2016) was hanging on load because it was stalling the main thread expecting a shadow-related image to be read back from the GPU, but the actual memory copy deferred operation did not execute yet. With a thread in the background making sure the copy happens when the tick is reached, instead of whenever the scheduler is next updated to pop deferred operations, the game now progresses without any patches (with readback and readbackLinearImages enabled). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:17 +03:00
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#3597
No description provided.