summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2024-01-07 07:52:09 +0100
committerLiam <byteslice@airmail.cc>2024-01-19 03:12:30 +0100
commit648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37 (patch)
treea04969c1af408b377981b395a8f437b852f8b208 /src/core/core.cpp
parentCore: Eliminate core/memory dependancies. (diff)
downloadyuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.gz
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.bz2
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.lz
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.xz
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.zst
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.zip
Diffstat (limited to '')
-rw-r--r--src/core/core.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 04e1f13ff..2392fe136 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -28,6 +28,7 @@
#include "core/file_sys/savedata_factory.h"
#include "core/file_sys/vfs_concat.h"
#include "core/file_sys/vfs_real.h"
+#include "core/gpu_dirty_memory_manager.h"
#include "core/hle/kernel/k_memory_manager.h"
#include "core/hle/kernel/k_process.h"
#include "core/hle/kernel/k_resource_limit.h"
@@ -565,6 +566,9 @@ struct System::Impl {
std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{};
std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_cpu{};
+ std::array<Core::GPUDirtyMemoryManager, Core::Hardware::NUM_CPU_CORES>
+ gpu_dirty_memory_managers;
+
std::deque<std::vector<u8>> user_channel;
};
@@ -651,8 +655,14 @@ size_t System::GetCurrentHostThreadID() const {
return impl->kernel.GetCurrentHostThreadID();
}
+std::span<GPUDirtyMemoryManager> System::GetGPUDirtyMemoryManager() {
+ return impl->gpu_dirty_memory_managers;
+}
+
void System::GatherGPUDirtyMemory(std::function<void(PAddr, size_t)>& callback) {
- return this->ApplicationProcess()->GatherGPUDirtyMemory(callback);
+ for (auto& manager : impl->gpu_dirty_memory_managers) {
+ manager.Gather(callback);
+ }
}
PerfStatsResults System::GetAndResetPerfStats() {