From eb67a45ca82bc01ac843c853fd3c17f2a90e0250 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 26 Oct 2020 23:07:36 -0400 Subject: video_core: NVDEC Implementation This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com> --- src/core/settings.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 28d3f9099..e14c02045 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -63,6 +63,7 @@ void LogSettings() { log_setting("Renderer_GPUAccuracyLevel", values.gpu_accuracy.GetValue()); log_setting("Renderer_UseAsynchronousGpuEmulation", values.use_asynchronous_gpu_emulation.GetValue()); + log_setting("Renderer_UseNvdecEmulation", values.use_nvdec_emulation.GetValue()); log_setting("Renderer_UseVsync", values.use_vsync.GetValue()); log_setting("Renderer_UseAssemblyShaders", values.use_assembly_shaders.GetValue()); log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); @@ -119,6 +120,7 @@ void RestoreGlobalState() { values.use_disk_shader_cache.SetGlobal(true); values.gpu_accuracy.SetGlobal(true); values.use_asynchronous_gpu_emulation.SetGlobal(true); + values.use_nvdec_emulation.SetGlobal(true); values.use_vsync.SetGlobal(true); values.use_assembly_shaders.SetGlobal(true); values.use_asynchronous_shaders.SetGlobal(true); -- cgit v1.2.3 From 7aae6d6d2bd9784cba5df5b98cd29198456dcbeb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 4 Nov 2020 04:16:34 -0500 Subject: core/settings: Move configuring_global behind an API Rather than have directly modified global state here, we can make it an implementation detail and have an interface that changes are queried through. --- src/core/settings.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index e14c02045..a99d3cf5a 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -14,7 +14,7 @@ namespace Settings { Values values = {}; -bool configuring_global = true; +static bool configuring_global = true; std::string GetTimeZoneString() { static constexpr std::array timezones{ @@ -81,11 +81,12 @@ void LogSettings() { log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local); } -float Volume() { - if (values.audio_muted) { - return 0.0f; - } - return values.volume.GetValue(); +bool IsConfiguringGlobal() { + return configuring_global; +} + +void SetConfiguringGlobal(bool is_global) { + configuring_global = is_global; } bool IsGPULevelExtreme() { @@ -97,6 +98,13 @@ bool IsGPULevelHigh() { values.gpu_accuracy.GetValue() == GPUAccuracy::High; } +float Volume() { + if (values.audio_muted) { + return 0.0f; + } + return values.volume.GetValue(); +} + void RestoreGlobalState() { // If a game is running, DO NOT restore the global settings state if (Core::System::GetInstance().IsPoweredOn()) { -- cgit v1.2.3 From 1e149dc18b1c47062538fee139fc509e3efbaaca Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sat, 7 Nov 2020 16:14:10 -0500 Subject: settings: log value of CPU_Accuracy --- src/core/settings.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index a99d3cf5a..0587b9374 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -56,6 +56,7 @@ void LogSettings() { log_setting("System_RegionIndex", values.region_index.GetValue()); log_setting("System_TimeZoneIndex", values.time_zone_index.GetValue()); log_setting("Core_UseMultiCore", values.use_multi_core.GetValue()); + log_setting("CPU_Accuracy", values.cpu_accuracy); log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue()); log_setting("Renderer_UseFrameLimit", values.use_frame_limit.GetValue()); log_setting("Renderer_FrameLimit", values.frame_limit.GetValue()); -- cgit v1.2.3 From 8f2959f6804e0d1048ecaa6f4046622e069fe7db Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Mon, 28 Sep 2020 10:00:15 -0400 Subject: settings: Preparation for per-game input settings --- src/core/settings.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 0587b9374..aadbc3932 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -49,7 +49,7 @@ void LogSettings() { }; LOG_INFO(Config, "yuzu Configuration:"); - log_setting("Controls_UseDockedMode", values.use_docked_mode); + log_setting("Controls_UseDockedMode", values.use_docked_mode.GetValue()); log_setting("System_RngSeed", values.rng_seed.GetValue().value_or(0)); log_setting("System_CurrentUser", values.current_user); log_setting("System_LanguageIndex", values.language_index.GetValue()); @@ -145,6 +145,12 @@ void RestoreGlobalState() { values.rng_seed.SetGlobal(true); values.custom_rtc.SetGlobal(true); values.sound_index.SetGlobal(true); + + // Controls + values.players.SetGlobal(true); + values.use_docked_mode.SetGlobal(true); + values.vibration_enabled.SetGlobal(true); + values.motion_enabled.SetGlobal(true); } void Sanitize() { -- cgit v1.2.3 From 652d6766d55acec6416dccb900a45c6660a86607 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 8 Oct 2020 23:43:07 -0400 Subject: configure_input: Hook up the vibration percentage spinbox This allows setting the vibration strength percentage anywhere from 1% to 100%. Also hooks up the remaining motion button and checkbox in the Controller Applet. --- src/core/settings.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index aadbc3932..6e39aebb5 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -150,6 +150,7 @@ void RestoreGlobalState() { values.players.SetGlobal(true); values.use_docked_mode.SetGlobal(true); values.vibration_enabled.SetGlobal(true); + values.vibration_strength.SetGlobal(true); values.motion_enabled.SetGlobal(true); } -- cgit v1.2.3 From d6a41cfc21a75349ca79e73da5ca1dcecd1af901 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Fri, 16 Oct 2020 11:55:45 -0400 Subject: settings: Remove global vibration strength modifier This will be replaced in favor of per-player vibration strength modifiers. --- src/core/settings.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 6e39aebb5..aadbc3932 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -150,7 +150,6 @@ void RestoreGlobalState() { values.players.SetGlobal(true); values.use_docked_mode.SetGlobal(true); values.vibration_enabled.SetGlobal(true); - values.vibration_strength.SetGlobal(true); values.motion_enabled.SetGlobal(true); } -- cgit v1.2.3 From 5bc4eabe36b7ef4dcd5ad8db1e944705655be432 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 27 Nov 2020 10:50:48 -0500 Subject: core: Eliminate remaining usages of the global system instance Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends. --- src/core/settings.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index aadbc3932..e9997a263 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -4,9 +4,10 @@ #include +#include "common/assert.h" #include "common/file_util.h" +#include "common/logging/log.h" #include "core/core.h" -#include "core/gdbstub/gdbstub.h" #include "core/hle/service/hid/hid.h" #include "core/settings.h" #include "video_core/renderer_base.h" @@ -31,13 +32,9 @@ std::string GetTimeZoneString() { return timezones[time_zone_index]; } -void Apply() { - GDBStub::SetServerPort(values.gdbstub_port); - GDBStub::ToggleServer(values.use_gdbstub); - - auto& system_instance = Core::System::GetInstance(); - if (system_instance.IsPoweredOn()) { - system_instance.Renderer().RefreshBaseSettings(); +void Apply(Core::System& system) { + if (system.IsPoweredOn()) { + system.Renderer().RefreshBaseSettings(); } Service::HID::ReloadInputDevices(); @@ -106,9 +103,9 @@ float Volume() { return values.volume.GetValue(); } -void RestoreGlobalState() { +void RestoreGlobalState(bool is_powered_on) { // If a game is running, DO NOT restore the global settings state - if (Core::System::GetInstance().IsPoweredOn()) { + if (is_powered_on) { return; } -- cgit v1.2.3 From 10b0ab792681b27664030d53d8e1ff610d0010cf Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 19 Dec 2020 19:19:42 +0100 Subject: yuzu: Remove gdbstub configuration The gdbstub itself was removed with https://github.com/yuzu-emu/yuzu/pull/5028. This PR just removes the remaining gdb configuration code from the emulator and the UI. --- src/core/settings.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index e9997a263..47d9ecf9a 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -72,8 +72,6 @@ void LogSettings() { log_setting("DataStorage_UseVirtualSd", values.use_virtual_sd); log_setting("DataStorage_NandDir", Common::FS::GetUserPath(Common::FS::UserPath::NANDDir)); log_setting("DataStorage_SdmcDir", Common::FS::GetUserPath(Common::FS::UserPath::SDMCDir)); - log_setting("Debugging_UseGdbstub", values.use_gdbstub); - log_setting("Debugging_GdbstubPort", values.gdbstub_port); log_setting("Debugging_ProgramArgs", values.program_args); log_setting("Services_BCATBackend", values.bcat_backend); log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local); -- cgit v1.2.3 From 916438a9de378f97129df7f5a979bb1a406cda9f Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 12 Dec 2020 00:50:22 -0800 Subject: core: settings: Untangle multicore from asynchronous GPU. - Now that GPU is always threaded, we can support multicore with synchronous GPU. --- src/core/settings.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/core/settings.cpp') diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 47d9ecf9a..39306509a 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -148,9 +148,4 @@ void RestoreGlobalState(bool is_powered_on) { values.motion_enabled.SetGlobal(true); } -void Sanitize() { - values.use_asynchronous_gpu_emulation.SetValue( - values.use_asynchronous_gpu_emulation.GetValue() || values.use_multi_core.GetValue()); -} - } // namespace Settings -- cgit v1.2.3