summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp20
-rw-r--r--src/yuzu/main.h1
2 files changed, 20 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 524650144..c55f81c2f 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2229,8 +2229,10 @@ void GMainWindow::OnGameListRemoveFile(u64 program_id, GameListRemoveTarget targ
2229 } 2229 }
2230 2230
2231 switch (target) { 2231 switch (target) {
2232 case GameListRemoveTarget::GlShaderCache:
2233 case GameListRemoveTarget::VkShaderCache: 2232 case GameListRemoveTarget::VkShaderCache:
2233 RemoveVulkanDriverPipelineCache(program_id);
2234 [[fallthrough]];
2235 case GameListRemoveTarget::GlShaderCache:
2234 RemoveTransferableShaderCache(program_id, target); 2236 RemoveTransferableShaderCache(program_id, target);
2235 break; 2237 break;
2236 case GameListRemoveTarget::AllShaderCache: 2238 case GameListRemoveTarget::AllShaderCache:
@@ -2271,6 +2273,22 @@ void GMainWindow::RemoveTransferableShaderCache(u64 program_id, GameListRemoveTa
2271 } 2273 }
2272} 2274}
2273 2275
2276void GMainWindow::RemoveVulkanDriverPipelineCache(u64 program_id) {
2277 static constexpr std::string_view target_file_name = "vulkan_pipelines.bin";
2278
2279 const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir);
2280 const auto shader_cache_folder_path = shader_cache_dir / fmt::format("{:016x}", program_id);
2281 const auto target_file = shader_cache_folder_path / target_file_name;
2282
2283 if (!Common::FS::Exists(target_file)) {
2284 return;
2285 }
2286 if (!Common::FS::RemoveFile(target_file)) {
2287 QMessageBox::warning(this, tr("Error Removing Vulkan Driver Pipeline Cache"),
2288 tr("Failed to remove the driver pipeline cache."));
2289 }
2290}
2291
2274void GMainWindow::RemoveAllTransferableShaderCaches(u64 program_id) { 2292void GMainWindow::RemoveAllTransferableShaderCaches(u64 program_id) {
2275 const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir); 2293 const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir);
2276 const auto program_shader_cache_dir = shader_cache_dir / fmt::format("{:016x}", program_id); 2294 const auto program_shader_cache_dir = shader_cache_dir / fmt::format("{:016x}", program_id);
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index db318485d..f25ce65a8 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -347,6 +347,7 @@ private:
347 void RemoveUpdateContent(u64 program_id, InstalledEntryType type); 347 void RemoveUpdateContent(u64 program_id, InstalledEntryType type);
348 void RemoveAddOnContent(u64 program_id, InstalledEntryType type); 348 void RemoveAddOnContent(u64 program_id, InstalledEntryType type);
349 void RemoveTransferableShaderCache(u64 program_id, GameListRemoveTarget target); 349 void RemoveTransferableShaderCache(u64 program_id, GameListRemoveTarget target);
350 void RemoveVulkanDriverPipelineCache(u64 program_id);
350 void RemoveAllTransferableShaderCaches(u64 program_id); 351 void RemoveAllTransferableShaderCaches(u64 program_id);
351 void RemoveCustomConfiguration(u64 program_id, const std::string& game_path); 352 void RemoveCustomConfiguration(u64 program_id, const std::string& game_path);
352 std::optional<u64> SelectRomFSDumpTarget(const FileSys::ContentProvider&, u64 program_id); 353 std::optional<u64> SelectRomFSDumpTarget(const FileSys::ContentProvider&, u64 program_id);