mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #1982] [MERGED] Speed up LiverpoolToVK::SurfaceFormat #2417
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#2417
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/1982
Author: @hspir404
Created: 12/30/2024
Status: ✅ Merged
Merged: 1/2/2025
Merged by: @raphaelthegreat
Base:
main← Head:perf-liverpooltovk-surfaceformat📝 Commits (3)
949171dSpeed up LiverpoolToVK::SurfaceFormat35b199dImplement SurfaceFormat with derived lookup table instead of switch25ac454Clang format fixes📊 Changes
1 file changed (+33 additions, -9 deletions)
View changed files
📝
src/video_core/renderer_vulkan/liverpool_to_vk.cpp(+33 -9)📄 Description
In Bloodborne this shows up as the function with the very highest cumulative "exclusive time". This is true both in scenes that perform poorly, and scenes that perform well.
I took (approximately) 10s samples using an 8khz sampling profiler.
In the Nightmare Grand Cathedral (looking towards the stairs, at the rest of the level):
00-savedata.zip




Before:
After:
Before:
After:
In the Hunter's Dream (in the spawn position):
01-savedata.zip




Before:
After:
Before:
After:
These are profiles of the change vs the version currently in the main branch. These improvements also improve things in the
lockingbranch. They might improve them even more in that branch, but I didn't bother keeping track of my measurements as well in that branch. I believe this change will still be useful even when that branch is stabilized and merged.It could be there are other bottlenecks in rendering on the main branch that are preventing this code from being the critical path in places like the Hunter's Dream, where the frame times aren't as high. That might explain why the reduction in call times isn't resulting in a higher frame rate in every scene.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.