summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2023-06-28 19:32:50 +0200
committerGravatar Fernando Sahmkow2023-06-28 21:32:45 +0200
commitda440da9f54cc860f3c69da685a415d5ec9d7b64 (patch)
tree5a7a4a56462244970e1356a723e6a8a77477f820 /src/core/core.cpp
parentMemoryTracking: Initial setup of atomic writes. (diff)
downloadyuzu-da440da9f54cc860f3c69da685a415d5ec9d7b64.tar.gz
yuzu-da440da9f54cc860f3c69da685a415d5ec9d7b64.tar.xz
yuzu-da440da9f54cc860f3c69da685a415d5ec9d7b64.zip
Memory Tracking: Optimize tracking to only use atomic writes when contested with the host GPU
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index deefeb301..9e3eb3795 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -55,7 +55,6 @@
55#include "video_core/renderer_base.h" 55#include "video_core/renderer_base.h"
56#include "video_core/video_core.h" 56#include "video_core/video_core.h"
57 57
58
59MICROPROFILE_DEFINE(ARM_CPU0, "ARM", "CPU 0", MP_RGB(255, 64, 64)); 58MICROPROFILE_DEFINE(ARM_CPU0, "ARM", "CPU 0", MP_RGB(255, 64, 64));
60MICROPROFILE_DEFINE(ARM_CPU1, "ARM", "CPU 1", MP_RGB(255, 64, 64)); 59MICROPROFILE_DEFINE(ARM_CPU1, "ARM", "CPU 1", MP_RGB(255, 64, 64));
61MICROPROFILE_DEFINE(ARM_CPU2, "ARM", "CPU 2", MP_RGB(255, 64, 64)); 60MICROPROFILE_DEFINE(ARM_CPU2, "ARM", "CPU 2", MP_RGB(255, 64, 64));
@@ -132,7 +131,10 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
132struct System::Impl { 131struct System::Impl {
133 explicit Impl(System& system) 132 explicit Impl(System& system)
134 : kernel{system}, fs_controller{system}, memory{system}, hid_core{}, room_network{}, 133 : kernel{system}, fs_controller{system}, memory{system}, hid_core{}, room_network{},
135 cpu_manager{system}, reporter{system}, applet_manager{system}, time_manager{system} {} 134 cpu_manager{system}, reporter{system}, applet_manager{system}, time_manager{system},
135 gpu_dirty_memory_write_manager{} {
136 memory.SetGPUDirtyManagers(gpu_dirty_memory_write_manager);
137 }
136 138
137 void Initialize(System& system) { 139 void Initialize(System& system) {
138 device_memory = std::make_unique<Core::DeviceMemory>(); 140 device_memory = std::make_unique<Core::DeviceMemory>();
@@ -236,6 +238,8 @@ struct System::Impl {
236 // Setting changes may require a full system reinitialization (e.g., disabling multicore). 238 // Setting changes may require a full system reinitialization (e.g., disabling multicore).
237 ReinitializeIfNecessary(system); 239 ReinitializeIfNecessary(system);
238 240
241 memory.SetGPUDirtyManagers(gpu_dirty_memory_write_manager);
242
239 kernel.Initialize(); 243 kernel.Initialize();
240 cpu_manager.Initialize(); 244 cpu_manager.Initialize();
241 245