diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-11-01 13:26:30 -0500 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-11-01 13:26:30 -0500 |
| commit | aeb201df73bdae920e857db8c6a1ad9979999ce1 (patch) | |
| tree | 03e03ab9a6a2950dc77c892518840d52a8eec452 /src/video_core | |
| parent | b9c1d423e8e0b9318b5af96af4734ffd2cb8b43e (diff) | |
| parent | 70b39fe1d247ba62aa9382c09a457fb57aa9d7fb (diff) | |
Merge remote-tracking branch 'origin/fix/vk-no-pipeline-cache-nv-amd' into test/linux-all-prs
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 52eb81859a..80bff9b654 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -356,6 +356,22 @@ bool GraphicsPipelineCacheKey::operator==(const GraphicsPipelineCacheKey& rhs) c return std::memcmp(&rhs, this, Size()) == 0; } +namespace { +// NVIDIA's and AMD's drivers keep a disk cache of built pipelines of their own. Eden's copy on top +// only kept every pipeline the title ever built in host memory (title 1: a 245 MB file, ~0.35 GB +// of RAM for the session) and copied it whole at each save, which stalled frames; pipelines built +// no slower without it. +bool DriverCachesPipelines(const Device& device) { + switch (device.GetDriverID()) { + case VK_DRIVER_ID_NVIDIA_PROPRIETARY: + case VK_DRIVER_ID_AMD_PROPRIETARY: + return true; + default: + return false; + } +} +} // Anonymous namespace + PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, const Device& device_, Scheduler& scheduler_, DescriptorPool& descriptor_pool_, @@ -369,7 +385,8 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, render_pass_cache{render_pass_cache_}, buffer_cache{buffer_cache_}, texture_cache{texture_cache_}, shader_notify{shader_notify_}, use_asynchronous_shaders{Settings::values.use_asynchronous_shaders.GetValue()}, - use_vulkan_pipeline_cache{Settings::values.use_vulkan_driver_pipeline_cache.GetValue()}, + use_vulkan_pipeline_cache{Settings::values.use_vulkan_driver_pipeline_cache.GetValue() && + !DriverCachesPipelines(device_)}, workers(device.HasBrokenParallelShaderCompiling() ? 1ULL : GetTotalPipelineWorkers(), "VkPipelineBuilder", {}, Common::ThreadPlacement::Background), serialization_thread(1, "VkPipelineSerialization", {}, |
