mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 16:25:58 +03:00
[GH-ISSUE #2787] [Feature Request]: Shader & Pipeline Cache Persistence (SPIR-V & Shader Replacement Support) #903
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#903
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?
Originally created by @ydzat on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2787
Checklist
Description
I attempted to introduce a persistent shader cache system for the project with the following features:
General Goals:
1. Implementation Summary
Modified Files:
vk_pipeline_cache.hvk_pipeline_cache.cppconfig.hconfig.cppMain Features:
1. Vulkan Pipeline Cache Management
Files:
vk_pipeline_cache.h,vk_pipeline_cache.cppNew Methods:
New Variables:
Logic:
2. Config Support
File:
config.cpp,config.h3. SPIR-V Compilation Optimization
File:
vk_pipeline_cache.cpp4. Shader Replacement Feature
File:
vk_pipeline_cache.cpp5. Shader Module Naming
File:
vk_pipeline_cache.cpp6. Cache Path Management
File:
vk_pipeline_cache.cpp7. Statistics Tracking
Files:
vk_pipeline_cache.h,vk_pipeline_cache.cpp8. Debug Logging
File:
vk_pipeline_cache.cpp2. File Relationships
vk_pipeline_cache.h: Declares interfaces for cache and compilation.vk_pipeline_cache.cpp: Implements logic including caching, shader patching, replacement.config.cpp: AddsshouldUseShaderCache, allowing runtime toggle and persistence.Cache paths in
vk_pipeline_cache.cpprespect user configuration from config.cpp.Reason
Examples
No response
@thecatontheceiling commented on GitHub (Apr 15, 2025):
What is the point of sharting out AI slop in a feature request issue
@ydzat commented on GitHub (Apr 15, 2025):
As I asked in shadps4's discord, AI-generated code is generally not guaranteed to be accurate, so pull requests should not be made.
Therefore, I can only provide ideas in as much detail as possible, hoping to be helpful to interested developers ;)
@thecatontheceiling commented on GitHub (Apr 15, 2025):
It's not helping much because the only thing it did is list what files it changed and what variables it added with a one sentence explanation of what was changed (which in almost every case put emphasis on something extremely trivial).
It's just not very useful as it doesn't even function as an implementation plan. AI is not capable of participating in the development of complex emulator code.
@ydzat commented on GitHub (Apr 15, 2025):
Ok, sorry :( I thought this would help because it does reduce the lag to some extent when I run it locally. Looks like I'll just have to close this thread. Also, what should I put forward to be considered helpful?
@thecatontheceiling commented on GitHub (Apr 15, 2025):
I didn't mean to bully you into closing this issue lol
The feature itself that you're suggesting is a good idea (on paper), I meant to say that AI can't really help with something as complex to implement as this
Many other complex emulators like RPCS3 and Ryujinx also have some form of shader caching implemented, and it would be nice if ShadPS4 had something similar too
When you make a feature request you're not expected to provide an implementation of said feature, that is what pull requests are for :)