mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #3204] [MERGED] texture_cache: Async download of GPU modified linear images #3302
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3302
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3204
Author: @raphaelthegreat
Created: 7/7/2025
Status: ✅ Merged
Merged: 7/7/2025
Merged by: @georgemoralis
Base:
main← Head:linear-img📝 Commits (4)
ea9a2actexture_cache: Async download of GPU modified linear images4238cd9liverpool: Back to less submitsac430catexture_cache: Don't download depth images12bc09cconfig: Add option for linear image readback📊 Changes
10 files changed (+106 additions, -16 deletions)
View changed files
📝
src/common/config.cpp(+10 -1)📝
src/common/config.h(+1 -0)📝
src/video_core/amdgpu/liverpool.cpp(+1 -2)📝
src/video_core/buffer_cache/buffer_cache.h(+1 -1)📝
src/video_core/renderer_vulkan/vk_rasterizer.cpp(+12 -4)📝
src/video_core/renderer_vulkan/vk_rasterizer.h(+1 -1)📝
src/video_core/renderer_vulkan/vk_scheduler.cpp(+9 -4)📝
src/video_core/renderer_vulkan/vk_scheduler.h(+3 -0)📝
src/video_core/texture_cache/texture_cache.cpp(+59 -2)📝
src/video_core/texture_cache/texture_cache.h(+9 -1)📄 Description
@AboMedoz mentioned to me that @Ruahh reported a softlock in The Last Guardian regarding water physics, this PR fixes that. Turns out it creates a bunch of images with linear tiling and expects to read them on the CPU. I've also noticed this improves the post processing of the game, but requires more testing.
Doing proper read protection on the texture cache is much more difficult than buffer cache, as images can overlap with each other, so it triggers false positives a bunch of times. Also images generally occupy more space and are more difficult to download a per page basis, as there is no fine grained tracking. So this PR simply downloads them in async way to avoid dealing with those problems and still get the data to the CPU, even if a frame late.
I'll probably add an option for this too, even if it should have much less perf impact compared to buffer readbacks.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.