[PR #1034] [MERGED] video_core: Separate dirty flags and better gpu invalidation #1892

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1034
Author: @raphaelthegreat
Created: 9/23/2024
Status: Merged
Merged: 9/23/2024
Merged by: @georgemoralis

Base: mainHead: gpu-dirty


📝 Commits (1)

  • 4564acd video_core: Separate dirty flags and better gpu invalidation

📊 Changes

6 files changed (+28 additions, -31 deletions)

View changed files

📝 src/video_core/buffer_cache/buffer_cache.cpp (+1 -1)
📝 src/video_core/renderer_vulkan/vk_compute_pipeline.cpp (+1 -1)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+1 -1)
📝 src/video_core/texture_cache/image.h (+4 -6)
📝 src/video_core/texture_cache/texture_cache.cpp (+20 -21)
📝 src/video_core/texture_cache/texture_cache.h (+1 -1)

📄 Description

Some games like RDR keep overlapping framebuffers in the same address and have the same pitch, but different dimentions. This resulted in cases where MarkWritten would invalidate the wrong FB, leaving the one the game actually wanted to use later with data from the previous frame.

To fix this mark all overlapping images with matching address as dirty. Also separate the dirty flags for gpu and cpu dirtiness which makes the code more explicit/clear while at it


🔄 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/1034 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 9/23/2024 **Status:** ✅ Merged **Merged:** 9/23/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `gpu-dirty` --- ### 📝 Commits (1) - [`4564acd`](https://github.com/shadps4-emu/shadPS4/commit/4564acd3c6abe443f39aa4eac5cec88b21d9e649) video_core: Separate dirty flags and better gpu invalidation ### 📊 Changes **6 files changed** (+28 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/buffer_cache/buffer_cache.cpp` (+1 -1) 📝 `src/video_core/renderer_vulkan/vk_compute_pipeline.cpp` (+1 -1) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+1 -1) 📝 `src/video_core/texture_cache/image.h` (+4 -6) 📝 `src/video_core/texture_cache/texture_cache.cpp` (+20 -21) 📝 `src/video_core/texture_cache/texture_cache.h` (+1 -1) </details> ### 📄 Description Some games like RDR keep overlapping framebuffers in the same address and have the same pitch, but different dimentions. This resulted in cases where MarkWritten would invalidate the wrong FB, leaving the one the game actually wanted to use later with data from the previous frame. To fix this mark all overlapping images with matching address as dirty. Also separate the dirty flags for gpu and cpu dirtiness which makes the code more explicit/clear while at it --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:21 +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#1892
No description provided.