diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-18 21:51:42 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-22 17:36:04 +0200 |
commit | 084ceb925acad470b69467d64e4dfbb3bd7ef3f1 (patch) | |
tree | 3e4dcc3a3671b85cb3ac5f812159974c006e3c47 /src/core | |
parent | Merge pull request #3714 from lioncash/copies (diff) | |
download | yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.tar yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.tar.gz yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.tar.bz2 yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.tar.lz yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.tar.xz yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.tar.zst yuzu-084ceb925acad470b69467d64e4dfbb3bd7ef3f1.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/settings.cpp | 2 | ||||
-rw-r--r-- | src/core/settings.h | 16 | ||||
-rw-r--r-- | src/core/telemetry_session.cpp | 16 |
3 files changed, 30 insertions, 4 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index c1282cb80..445047469 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -92,7 +92,7 @@ void LogSettings() { LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit); LogSetting("Renderer_FrameLimit", Settings::values.frame_limit); LogSetting("Renderer_UseDiskShaderCache", Settings::values.use_disk_shader_cache); - LogSetting("Renderer_UseAccurateGpuEmulation", Settings::values.use_accurate_gpu_emulation); + LogSetting("Renderer_GPUAccuracyLevel", Settings::values.gpu_accuracy); LogSetting("Renderer_UseAsynchronousGpuEmulation", Settings::values.use_asynchronous_gpu_emulation); LogSetting("Renderer_UseVsync", Settings::values.use_vsync); diff --git a/src/core/settings.h b/src/core/settings.h index c73d1c596..b54a0d4ea 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -376,6 +376,12 @@ enum class RendererBackend { Vulkan = 1, }; +enum class GPUAccuracy : u32 { + Normal = 0, + High = 1, + Extreme = 2, +}; + struct Values { // System bool use_docked_mode; @@ -436,7 +442,7 @@ struct Values { bool use_frame_limit; u16 frame_limit; bool use_disk_shader_cache; - bool use_accurate_gpu_emulation; + GPUAccuracy gpu_accuracy; bool use_asynchronous_gpu_emulation; bool use_vsync; bool force_30fps_mode; @@ -480,6 +486,14 @@ struct Values { std::map<u64, std::vector<std::string>> disabled_addons; } extern values; +constexpr bool IsGPULevelExtreme() { + return values.gpu_accuracy == GPUAccuracy::Extreme; +} + +constexpr bool IsGPULevelHigh() { + return values.gpu_accuracy == GPUAccuracy::Extreme || values.gpu_accuracy == GPUAccuracy::High; +} + void Apply(); void LogSettings(); } // namespace Settings diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index fd5a3ee9f..1c3b03a1c 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -56,6 +56,18 @@ static const char* TranslateRenderer(Settings::RendererBackend backend) { return "Unknown"; } +static const char* TranslateGPUAccuracyLevel(Settings::GPUAccuracy backend) { + switch (backend) { + case Settings::GPUAccuracy::Normal: + return "Normal"; + case Settings::GPUAccuracy::High: + return "High"; + case Settings::GPUAccuracy::Extreme: + return "Extreme"; + } + return "Unknown"; +} + u64 GetTelemetryId() { u64 telemetry_id{}; const std::string filename{FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) + @@ -184,8 +196,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) { AddField(field_type, "Renderer_UseFrameLimit", Settings::values.use_frame_limit); AddField(field_type, "Renderer_FrameLimit", Settings::values.frame_limit); AddField(field_type, "Renderer_UseDiskShaderCache", Settings::values.use_disk_shader_cache); - AddField(field_type, "Renderer_UseAccurateGpuEmulation", - Settings::values.use_accurate_gpu_emulation); + AddField(field_type, "Renderer_GPUAccuracyLevel", + TranslateGPUAccuracyLevel(Settings::values.gpu_accuracy)); AddField(field_type, "Renderer_UseAsynchronousGpuEmulation", Settings::values.use_asynchronous_gpu_emulation); AddField(field_type, "Renderer_UseVsync", Settings::values.use_vsync); |