diff options
| author | 2021-05-27 23:29:22 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:34 -0400 | |
| commit | dd39b87b0cfb640418278c55669f621bfd4addf5 (patch) | |
| tree | 8acd0da47467ec488906ca1ef6d636f44326743d /src | |
| parent | shader: Fix TMML queries (diff) | |
| download | yuzu-dd39b87b0cfb640418278c55669f621bfd4addf5.tar.gz yuzu-dd39b87b0cfb640418278c55669f621bfd4addf5.tar.xz yuzu-dd39b87b0cfb640418278c55669f621bfd4addf5.zip | |
shader: Adhere to disk shader cache setting
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 13 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 8 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index d72ca5acc..25b658b2a 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -64,12 +64,13 @@ void EmuThread::run() { | |||
| 64 | 64 | ||
| 65 | emit LoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0); | 65 | emit LoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0); |
| 66 | 66 | ||
| 67 | system.Renderer().ReadRasterizer()->LoadDiskResources( | 67 | if (Settings::values.use_disk_shader_cache.GetValue()) { |
| 68 | system.CurrentProcess()->GetTitleID(), stop_token, | 68 | system.Renderer().ReadRasterizer()->LoadDiskResources( |
| 69 | [this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) { | 69 | system.CurrentProcess()->GetTitleID(), stop_token, |
| 70 | emit LoadProgress(stage, value, total); | 70 | [this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) { |
| 71 | }); | 71 | emit LoadProgress(stage, value, total); |
| 72 | 72 | }); | |
| 73 | } | ||
| 73 | emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0); | 74 | emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0); |
| 74 | 75 | ||
| 75 | gpu.ReleaseContext(); | 76 | gpu.ReleaseContext(); |
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index ac4ea88d3..35ce23696 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -218,9 +218,11 @@ int main(int argc, char** argv) { | |||
| 218 | // Core is loaded, start the GPU (makes the GPU contexts current to this thread) | 218 | // Core is loaded, start the GPU (makes the GPU contexts current to this thread) |
| 219 | system.GPU().Start(); | 219 | system.GPU().Start(); |
| 220 | 220 | ||
| 221 | system.Renderer().ReadRasterizer()->LoadDiskResources( | 221 | if (Settings::values.use_disk_shader_cache.GetValue()) { |
| 222 | system.CurrentProcess()->GetTitleID(), std::stop_token{}, | 222 | system.Renderer().ReadRasterizer()->LoadDiskResources( |
| 223 | [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); | 223 | system.CurrentProcess()->GetTitleID(), std::stop_token{}, |
| 224 | [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); | ||
| 225 | } | ||
| 224 | 226 | ||
| 225 | void(system.Run()); | 227 | void(system.Run()); |
| 226 | while (emu_window->IsOpen()) { | 228 | while (emu_window->IsOpen()) { |