mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #2335] [MERGED] Reduce redundant calls to sceKernelIsNeoMode, improve BB frame times #2658
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#2658
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/2335
Author: @hspir404
Created: 2/3/2025
Status: ✅ Merged
Merged: 2/3/2025
Merged by: @squidbus
Base:
main← Head:reduce-is-neo-mode-calls📝 Commits (1)
0cb888dRemove log line that was consuming as much as 0.6ms frame time📊 Changes
1 file changed (+0 additions, -1 deletions)
View changed files
📝
src/core/libraries/kernel/process.cpp(+0 -1)📄 Description
I found this call to
sceKernelIsNeoModewhile poking around in the profiler. I saw that calls are very frequent (especially inside the conversion of texture descriptors to the Vulkan renderer). They are taking up some 750+ ms out of a 10 second sample. I sampled in several different places, and these calls were often only taking up as much as 400ms, depending on the scene being rendered, but still a not small chunk.This change makes the code very slightly less appealing, but it's reducing 6040 calls to 65 (at least, those are the ones the sample-based profiler caught in a 10 second sample). Specifically, that sample was taken at the top of the DLC Nightmare Catherdral, notably the worst performing part of the game I've been able to find.
Before:

After:

I made an automation build here and tested both EXEs side by side in several parts of the game, and have screenshots from those tests. I loaded the emulator and loaded the save game, straight into these areas, and did not move the camera. I let the frame rate settle before taking screenshots, and attempted to capture the screenshot that got the highest frame rate I was seeing. If I missed the screenshot, I let it settle a bit again before taking another one.
Test Configuration -
Game Mods:
Box:
In almost every scene there is a slight performance improvement.
Some other folks in chat also did some A/B testing, took some screenshots, and were getting a bit of a performance increase.
Before:

After:

Before:

After:

Before:

After:

Before:

After

Before:

After:

Before:

After:

Before:

After:

Before:

After:

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.