[PR #2198] [MERGED] texture_cache: Lock when updating image. #2555

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2198
Author: @squidbus
Created: 1/20/2025
Status: Merged
Merged: 1/20/2025
Merged by: @psucien

Base: mainHead: cache-lock


📝 Commits (1)

  • 8d6a799 texture_cache: Lock when updating image.

📊 Changes

2 files changed (+3 additions, -4 deletions)

View changed files

📝 src/video_core/texture_cache/texture_cache.cpp (+2 -4)
📝 src/video_core/texture_cache/texture_cache.h (+1 -0)

📄 Description

UpdateImage need to acquire lock in order to prevent race conditions updating tracking status. Also fixed up the range check in InvalidateMemory to use the existing image overlap function.

Fixes possible crash due to tracking asserts. Texture cache will probably need a pass in the future to clean up/reduce locking.


🔄 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/2198 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 1/20/2025 **Status:** ✅ Merged **Merged:** 1/20/2025 **Merged by:** [@psucien](https://github.com/psucien) **Base:** `main` ← **Head:** `cache-lock` --- ### 📝 Commits (1) - [`8d6a799`](https://github.com/shadps4-emu/shadPS4/commit/8d6a7999b24d50f3129a1de28bf5ead97cdc42a0) texture_cache: Lock when updating image. ### 📊 Changes **2 files changed** (+3 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/texture_cache/texture_cache.cpp` (+2 -4) 📝 `src/video_core/texture_cache/texture_cache.h` (+1 -0) </details> ### 📄 Description `UpdateImage` need to acquire lock in order to prevent race conditions updating tracking status. Also fixed up the range check in `InvalidateMemory` to use the existing image overlap function. Fixes possible crash due to tracking asserts. Texture cache will probably need a pass in the future to clean up/reduce locking. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:00:22 +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#2555
No description provided.