[PR #1451] [CLOSED] texture_cache: Implement subresource specific uploads #2117

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1451
Author: @raphaelthegreat
Created: 10/26/2024
Status: Closed

Base: mainHead: subres-up


📝 Commits (3)

  • 54cae5d cmake: Enable userfaultfd
  • 7702ceb texture_cache: Subresource uploads
  • dc5b856 vk_compute_pipeline: Add missed meta check

📊 Changes

7 files changed (+94 additions, -22 deletions)

View changed files

📝 CMakeLists.txt (+7 -0)
📝 src/video_core/amdgpu/liverpool.cpp (+1 -1)
📝 src/video_core/page_manager.cpp (+1 -1)
📝 src/video_core/renderer_vulkan/vk_compute_pipeline.cpp (+17 -2)
📝 src/video_core/texture_cache/image.cpp (+3 -0)
📝 src/video_core/texture_cache/image.h (+16 -0)
📝 src/video_core/texture_cache/texture_cache.cpp (+49 -18)

📄 Description

It is a common pattern for games to clear specific subresources of an image (either a mipmap or a layer). Bloodborne renders to an texture cube by individually clearing the faces with compute dispatches and rendering to them. Red Dead Redemption clears the first mipmap of images that have many. Without this handling subsequent usages of said image can either clear subresources that were rendered or trash the image with cpu data if a gpu buffer doesn't happen to cover the entire image size.

Before merging, support for images with more than 64 subresources needs to be added (will trigger an assert for now).


🔄 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/1451 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 10/26/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `subres-up` --- ### 📝 Commits (3) - [`54cae5d`](https://github.com/shadps4-emu/shadPS4/commit/54cae5dff84cd8bd07d310354e9b64bcbf9dc4c7) cmake: Enable userfaultfd - [`7702ceb`](https://github.com/shadps4-emu/shadPS4/commit/7702ceb8d18efc00d411f43c5ea58cc0bef870a4) texture_cache: Subresource uploads - [`dc5b856`](https://github.com/shadps4-emu/shadPS4/commit/dc5b8564348270c9e3621e77d09f97adde5ffff1) vk_compute_pipeline: Add missed meta check ### 📊 Changes **7 files changed** (+94 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+7 -0) 📝 `src/video_core/amdgpu/liverpool.cpp` (+1 -1) 📝 `src/video_core/page_manager.cpp` (+1 -1) 📝 `src/video_core/renderer_vulkan/vk_compute_pipeline.cpp` (+17 -2) 📝 `src/video_core/texture_cache/image.cpp` (+3 -0) 📝 `src/video_core/texture_cache/image.h` (+16 -0) 📝 `src/video_core/texture_cache/texture_cache.cpp` (+49 -18) </details> ### 📄 Description It is a common pattern for games to clear specific subresources of an image (either a mipmap or a layer). Bloodborne renders to an texture cube by individually clearing the faces with compute dispatches and rendering to them. Red Dead Redemption clears the first mipmap of images that have many. Without this handling subsequent usages of said image can either clear subresources that were rendered or trash the image with cpu data if a gpu buffer doesn't happen to cover the entire image size. Before merging, support for images with more than 64 subresources needs to be added (will trigger an assert for now). --- <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:15 +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#2117
No description provided.