[PR #3057] [MERGED] buffer_cache: Better image search for buffer validation #3183

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3057
Author: @raphaelthegreat
Created: 6/8/2025
Status: Merged
Merged: 6/8/2025
Merged by: @georgemoralis

Base: mainHead: img-overlap


📝 Commits (1)

  • 727b8c6 buffer_cache: Better image search for buffer validation

📊 Changes

1 file changed (+36 additions, -15 deletions)

View changed files

📝 src/video_core/buffer_cache/buffer_cache.cpp (+36 -15)

📄 Description

When multiple overlapping images exist in same address and with different sizes, the old logic would pick the first one, which can end up being mismatched and causing a garbage copy. To address this iterate all the images and find the one that best matches the size.

This fixes a broken depth copy in Driveclub (CUSA00093) that made the screen garbage looking and might fix some depth effects


🔄 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/3057 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 6/8/2025 **Status:** ✅ Merged **Merged:** 6/8/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `img-overlap` --- ### 📝 Commits (1) - [`727b8c6`](https://github.com/shadps4-emu/shadPS4/commit/727b8c6b11328f1f144d6fc8cf54539222574355) buffer_cache: Better image search for buffer validation ### 📊 Changes **1 file changed** (+36 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/buffer_cache/buffer_cache.cpp` (+36 -15) </details> ### 📄 Description When multiple overlapping images exist in same address and with different sizes, the old logic would pick the first one, which can end up being mismatched and causing a garbage copy. To address this iterate all the images and find the one that best matches the size. This fixes a broken depth copy in Driveclub (CUSA00093) that made the screen garbage looking and might fix some depth effects --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:45 +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#3183
No description provided.