River 2 : HLE: Use per-program ownership for PTC disk caches #115
No reviewers
Labels
No labels
audio
bug
confirmed
cpu
critical
development
enhancement
gpu
graphics-backend:opengl
graphics-backend:vulkan
gui
help wanted
horizon/hle
i18n
infra
input
kernel
linux
macos
suggestion
windows
No assignees
2 participants
Notifications
Due date
No due date set.
Reference
projects/Ryubing!115
Loading…
Reference in a new issue
No description provided.
Delete branch "Babib3l/Ryubing:per-program-cache-ownership"
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?
This PR threads process/program identity into PTC disk cache initialization so cache ownership is selected from the launched process rather than global/shared application state.
Previously, the PTC initialization path only propagated loose title/version information into the CPU layer. That was mostly fine for a single launched application, but will introduce many problems once multiple programs can be launched during the same session, given later processes could inherit cache identity from the first loaded application.
To address this issue, this PR introduces a
PtcCacheInfopayload and applies it through the process context, CPU context, translator, and PTC initialization paths. Cache ownership is now resolved once the kernel process PID is known and includes:PtcCacheInfonow owns its default title/application/version values, andPtcuses that cache info directly instead of mirroring title/version fields internally.The persistent cache key itself does remains title/version/selector based rather than PID based, so caches remain reusable across launches while still being selected from the correct process context. PID is only used for diagnostics and ownership tracing in logs.
Additional PTC logging has also been added to report cache ownership and selected paths during PTC initialization, Profiling info load/save and translation cache load/save
Both the PTC and profiler internal versions were bumped (a bunch of times lol).
dfc0744acea6e3b10ba84b40578e2c291811bfd0291811bfd06e0725370b6e0725370bb51dadc851b51dadc8514ed5843958