Merge pull request #4923 from jroweboy/diskcachelul

Disk Shader Caching
This commit is contained in:
James Rowe 2020-01-17 18:15:50 -07:00 committed by GitHub
commit e74a402c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 1600 additions and 138 deletions

View file

@ -43,7 +43,7 @@
#include "core/movie.h"
#include "core/settings.h"
#include "network/network.h"
#include "video_core/video_core.h"
#include "video_core/renderer_base.h"
#undef _UNICODE
#include <getopt.h>
@ -413,6 +413,14 @@ int main(int argc, char** argv) {
}
std::thread render_thread([&emu_window] { emu_window->Present(); });
std::atomic_bool stop_run;
Core::System::GetInstance().Renderer().Rasterizer()->LoadDiskResources(
stop_run, [](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {
LOG_DEBUG(Frontend, "Loading stage {} progress {} {}", static_cast<u32>(stage), value,
total);
});
while (emu_window->IsOpen()) {
system.RunLoop();
}

View file

@ -122,6 +122,8 @@ void Config::ReadValues() {
Settings::values.resolution_factor =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
Settings::values.use_disk_shader_cache =
sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", true);
Settings::values.frame_limit =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
Settings::values.use_vsync_new =

View file

@ -117,6 +117,10 @@ use_shader_jit =
# 0: Off, 1 (default): On
use_vsync_new =
# Reduce stuttering by storing and loading generated shaders to disk
# 0: Off, 1 (default. On)
use_disk_shader_cache =
# Resolution scale factor
# 0: Auto (scales resolution to window size), 1: Native 3DS screen resolution, Otherwise a scale
# factor for the 3DS resolution