[PR #1670] [MERGED] video_core: fix for targets clears and copies #2234

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1670
Author: @psucien
Created: 12/5/2024
Status: Merged
Merged: 12/5/2024
Merged by: @raphaelthegreat

Base: mainHead: meta_tracking_fix


📝 Commits (1)

  • 0d80ffc video_core: fix for targets clears and copies

📊 Changes

3 files changed (+61 additions, -26 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+37 -12)
📝 src/video_core/texture_cache/texture_cache.cpp (+6 -9)
📝 src/video_core/texture_cache/texture_cache.h (+18 -5)

📄 Description

These changes add proper handling of two scenarios with use of metadata found in TLG:

  • arrayed CB/DB clears. Previously, we marked metas as dirty once correspondent attachments were bound to a render pass. Since their view information was ignored, all slices were considered as modified and clear was performed only on thefirst one. Now we track meta updates per slice;
  • meta copies. The game performs depth copy for futher re-uses and together with depth surface also copies its meta. Previously we considered this case as meta clear which led to depth clear as well, now we have a heuristic to detect copy.

🔄 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/1670 **Author:** [@psucien](https://github.com/psucien) **Created:** 12/5/2024 **Status:** ✅ Merged **Merged:** 12/5/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `meta_tracking_fix` --- ### 📝 Commits (1) - [`0d80ffc`](https://github.com/shadps4-emu/shadPS4/commit/0d80ffcf910c4f423f7be1fb0240e1d774d3e074) video_core: fix for targets clears and copies ### 📊 Changes **3 files changed** (+61 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+37 -12) 📝 `src/video_core/texture_cache/texture_cache.cpp` (+6 -9) 📝 `src/video_core/texture_cache/texture_cache.h` (+18 -5) </details> ### 📄 Description These changes add proper handling of two scenarios with use of metadata found in TLG: - arrayed CB/DB clears. Previously, we marked metas as dirty once correspondent attachments were bound to a render pass. Since their view information was ignored, all slices were considered as modified and clear was performed only on thefirst one. Now we track meta updates per slice; - meta copies. The game performs depth copy for futher re-uses and together with depth surface also copies its meta. Previously we considered this case as meta clear which led to depth clear as well, now we have a heuristic to detect copy. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:42 +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#2234
No description provided.