diff --git a/rpcs3/Emu/RSX/rsx_cache.h b/rpcs3/Emu/RSX/rsx_cache.h index 29144cea19..19369aee31 100644 --- a/rpcs3/Emu/RSX/rsx_cache.h +++ b/rpcs3/Emu/RSX/rsx_cache.h @@ -290,6 +290,11 @@ namespace rsx template void load(Args&& ...args) { + if (g_cfg.video.disable_on_disk_shader_cache) + { + return; + } + std::string directory_path = root_path + "/pipelines/" + pipeline_class_name; if (!fs::is_dir(directory_path)) @@ -378,6 +383,11 @@ namespace rsx void store(pipeline_storage_type &pipeline, RSXVertexProgram &vp, RSXFragmentProgram &fp) { + if (g_cfg.video.disable_on_disk_shader_cache) + { + return; + } + pipeline_data data = pack(pipeline, vp, fp); std::string fp_name = root_path + "/raw/" + fmt::format("%llX.fp", data.fragment_program_hash); std::string vp_name = root_path + "/raw/" + fmt::format("%llX.vp", data.vertex_program_hash); diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 769dedd866..91c1361a41 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -343,7 +343,8 @@ struct cfg_root : cfg::node cfg::_bool disable_zcull_queries{this, "Disable ZCull Occlusion Queries", false}; cfg::_bool disable_vertex_cache{this, "Disable Vertex Cache", false}; cfg::_bool frame_skip_enabled{this, "Enable Frame Skip", false}; - cfg::_bool force_cpu_blit_processing{this, "Force CPU Blit", false}; //Debugging option + cfg::_bool force_cpu_blit_processing{this, "Force CPU Blit", false}; // Debugging option + cfg::_bool disable_on_disk_shader_cache{this, "Disable On-Disk Shader Cache", false}; cfg::_int<1, 8> consequtive_frames_to_draw{this, "Consecutive Frames To Draw", 1}; cfg::_int<1, 8> consequtive_frames_to_skip{this, "Consecutive Frames To Skip", 1}; cfg::_int<50, 800> resolution_scale_percent{this, "Resolution Scale", 100}; diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json index 725aa1cea8..b65247f7bf 100644 --- a/rpcs3/Json/tooltips.json +++ b/rpcs3/Json/tooltips.json @@ -46,7 +46,8 @@ "debugOverlay": "Provides a graphical overlay of various debugging information.\nIf unsure, don't use this option.", "logProg": "Dump game shaders to file. Only useful to developers.\nIf unsure, don't use this option.", "disableOcclusionQueries": "Disables running occlusion queries. Minor to moderate performance boost.\nMight introduce issues with broken occlusion e.g missing geometry and extreme pop-in.", - "forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option." + "forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option.", + "disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory." }, "emulator": { "gui": { diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h index 000edd4578..9ed760399c 100644 --- a/rpcs3/rpcs3qt/emu_settings.h +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -63,6 +63,7 @@ public: ResolutionScale, MinimumScalableDimension, ForceCPUBlitEmulation, + DisableOnDiskShaderCache, // Audio AudioRenderer, @@ -213,6 +214,7 @@ private: { DisableVertexCache, { "Video", "Disable Vertex Cache"}}, { DisableOcclusionQueries, { "Video", "Disable ZCull Occlusion Queries" }}, { ForceCPUBlitEmulation, { "Video", "Force CPU Blit" }}, + { DisableOnDiskShaderCache, { "Video", "Disable On-Disk Shader Cache"}}, { AnisotropicFilterOverride,{ "Video", "Anisotropic Filter Override" }}, { ResolutionScale, { "Video", "Resolution Scale" }}, { MinimumScalableDimension, { "Video", "Minimum Scalable Dimension" }}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 6e43ee81ea..de1b78447c 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -954,6 +954,9 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceCheckBox(ui->forceCpuBlitEmulation, emu_settings::ForceCPUBlitEmulation); SubscribeTooltip(ui->forceCpuBlitEmulation, json_debug["forceCpuBlitEmulation"].toString()); + xemu_settings->EnhanceCheckBox(ui->disableOnDiskShaderCache, emu_settings::DisableOnDiskShaderCache); + SubscribeTooltip(ui->disableOnDiskShaderCache, json_debug["disableOnDiskShaderCache"].toString()); + // Checkboxes: core debug options xemu_settings->EnhanceCheckBox(ui->ppuDebug, emu_settings::PPUDebug); SubscribeTooltip(ui->ppuDebug, json_debug["ppuDebug"].toString()); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 09b7460bfb..5455401e0e 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -36,7 +36,7 @@ - 0 + 7 @@ -1666,6 +1666,13 @@ + + + + Disable On-Disk Shader Cache + + +