mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #480] [MERGED] vk_pipeline_cache: Avoid recompiling new shaders on each new PL #1590
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#1590
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/480
Author: @raphaelthegreat
Created: 8/19/2024
Status: ✅ Merged
Merged: 8/20/2024
Merged by: @raphaelthegreat
Base:
main← Head:less-shaders📝 Commits (3)
68c4658cfg: Add one more divergence case3789dberenderer_vulkan: Reduce number of compiled shaders0dc05cfvk_pipeline_cache: Remove some unnecessary checks📊 Changes
10 files changed (+125 additions, -86 deletions)
View changed files
📝
src/core/libraries/kernel/time_management.cpp(+7 -0)📝
src/shader_recompiler/frontend/control_flow_graph.cpp(+3 -2)📝
src/video_core/renderer_vulkan/vk_compute_pipeline.cpp(+14 -13)📝
src/video_core/renderer_vulkan/vk_compute_pipeline.h(+11 -3)📝
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp(+33 -28)📝
src/video_core/renderer_vulkan/vk_graphics_pipeline.h(+4 -5)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp(+47 -30)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.h(+3 -2)📝
src/video_core/renderer_vulkan/vk_rasterizer.cpp(+1 -1)📝
src/video_core/texture_cache/tile_manager.cpp(+2 -2)📄 Description
It was noticed that in BB the game would keep compiling shaders in the background without stopping which increased CPU usage. These shaders also consumed a lot of extra memory. This PR attempts to avoid this by only compiling new shaders when a new program hash is encountered (also the shader position in the pipeline is taken into account. This can be fixed by reworking descriptor sets a bit, can be later PR).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.