-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
renderer_vulkan: Introduce shader HLE system with copy shader implementation. #1683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Great news for SteamDeck owner! |
Steam Deck OLED Build 06471fe
|
One question @squidbus, can we expect a performance improvement in windows too? Thanks |
Have you checked on main? This doesn't look like something that would be related to this PR.
I think so. |
@GHU7924 Your error comes from the texel PR, which enabled userfaultfd by default. As a result of this, you'll need to run shadPS4 with sudo |
This causes P5D (Not P3D, P4D, or P5R though) to crash after the title screen in pro mode. It causes an assertion failure on texture_cache.cpp:operator():213: |
This PR does nothing that would effect that game, I would bet you may see that on main sometimes. EDIT: I am indeed seeing that crash on the current main. |
@squidbus @StevenMiller123 It looks like you're right and it doesn't apply to this PR, I'm sorry. I recently wrote a comment about my experience playing Bloodborne on Steam Deck OLED. #1641 (comment) Since I don't know much about Linux, I'll leave it as it is for now. EDIT: As for Windows, I feel that performance has improved and stabilized. |
THANK YOU!! I was only able to do one test run since my PC has blue screen issues but it looks great so far. This addresses issue #1547 |
Hopefully this make the 4K game patch more stable ? |
Made a quick video showcasing the difference if anyone's interested, pretty short and it's only in Central Yharnam but you can notice the spikes being gone in character creation |
…y shader implementation. shadps4-emu#1683
20241208-1216-08.0512223.mp4I have this bug with the this new build, I think could be because of the ram fix |
Untitled.video.4.mp4Here is another example of Boykimma on discord |
Please send a log as well |
shad_log.txt |
This is using an unofficial build outside of this PR, need the issue to be confirmed comparing main shadPS4 releases to builds from this PR. |
sorry my bad, give me 2 minutes |
Also needs to be with no mods, just to be sure. |
shad_log.txt |
You still have patches enabled. I need to know that this issue happens with this PR and no patches, and does not happen on main with no patches. |
Okay, I just delete the user folder and now boot the game from fresh, no patch, no mod. https://github.com/user-attachments/assets/ea72ad6e-d802-4a85-9bc7-8e67b4fccbf5 |
Here is my log |
06471fe
to
8e7ec9e
Compare
…y shader implementation. shadps4-emu#1683
Issue is determined to be an existing one that is exposed more heavily by this PR. Would be fixed with completed version of #1451 |
…y shader implementation. shadps4-emu#1683
Pushed something that should fix the issue for now. Subresource uploads will likely provide a more efficient fix but this should provide a good fallback to catch any cases where |
1d6f31a
to
cc0c498
Compare
…y shader implementation. shadps4-emu#1683
shadPS4.exe.2024.12.09.-.13.47.27.03.1.mp4Here i found another two. Above the door 1st one |
shadPS4.exe.2024.12.09.-.13.54.17.04.1.mp4 |
Needs comparison to main releases. |
Actually from your log it looks like you are already on main, those issues are not relevant to this PR. |
Oh. Ok. I just don’t know which PR to send them to. I thought it was the same problem and sent it here. |
It's only relevant if its something that happens with this PR builds and not on main releases. |
Btw these are not issues, it's just the lod, it happens on PS4 too I just checked |
|
This PR allows BB to be played on an iGPU now, great work ! |
Man this is so unrelated to what this PR touched. Also vertex explosions are pretty random |
…ntation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient --------- Co-authored-by: TheTurtle <[email protected]>
…mentation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient
…mentation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient
…mentation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient
…mentation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient
…mentation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient
…mentation. (shadps4-emu#1683) * renderer_vulkan: Introduce shader HLE system with copy shader implementation. Co-authored-by: TheTurtle <[email protected]> * buffer_cache: Handle obtaining buffer views partially within buffers. * vk_shader_hle: Make more efficient
Introduces a system for implementing more efficient HLE macros for simple shaders.
In this case, implements a macro for a copy shader used by Bloodborne to copy arbitrary blocks of memory from one buffer to another. Currently this shader is responsible for big spikes in memory usage from mapping 2GB+ buffers of memory space to arbitrarily copy between. On a real console this would not be an issue since it just provides a window into the memory range, but for us this results in buffer memory allocations to cover the entire range.
By implementing this shader in HLE we can avoid these giant buffer allocations, instead only mapping much smaller areas where the copy actually occurs. This should eliminate memory spikes, reduce overall VRAM usage, and be generally more performant. We hope to have a more low-level solution for this problem in the future, but pending that this is a good way to keep memory usage under control and improve performance.
This also allows Bloodborne to go in-game on macOS (if compiled using the latest dev build of MoltenVK) since this shader was the main blocker for that. Still needs some more improvements to be fully stable.
Thanks to @raphaelthegreat for implementing the algorithm to batch the copies together.