summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2024-01-07 07:52:09 +0100
committerGravatar Liam2024-01-18 21:12:30 -0500
commit648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37 (patch)
treea04969c1af408b377981b395a8f437b852f8b208 /src/core/core.cpp
parentCore: Eliminate core/memory dependancies. (diff)
downloadyuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.gz
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.tar.xz
yuzu-648ed55fe61f4f55f2a8c58d9bc2d4dca934cd37.zip
Core: Make sure GPU Dirty Managers ae shared by all processes.
Diffstat (limited to 'src/core/core.cpp')
-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 @@
28#include "core/file_sys/savedata_factory.h" 28#include "core/file_sys/savedata_factory.h"
29#include "core/file_sys/vfs_concat.h" 29#include "core/file_sys/vfs_concat.h"
30#include "core/file_sys/vfs_real.h" 30#include "core/file_sys/vfs_real.h"
31#include "core/gpu_dirty_memory_manager.h"
31#include "core/hle/kernel/k_memory_manager.h" 32#include "core/hle/kernel/k_memory_manager.h"
32#include "core/hle/kernel/k_process.h" 33#include "core/hle/kernel/k_process.h"
33#include "core/hle/kernel/k_resource_limit.h" 34#include "core/hle/kernel/k_resource_limit.h"
@@ -565,6 +566,9 @@ struct System::Impl {
565 std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{}; 566 std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{};
566 std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_cpu{}; 567 std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_cpu{};
567 568
569 std::array<Core::GPUDirtyMemoryManager, Core::Hardware::NUM_CPU_CORES>
570 gpu_dirty_memory_managers;
571
568 std::deque<std::vector<u8>> user_channel; 572 std::deque<std::vector<u8>> user_channel;
569}; 573};
570 574
@@ -651,8 +655,14 @@ size_t System::GetCurrentHostThreadID() const {
651 return impl->kernel.GetCurrentHostThreadID(); 655 return impl->kernel.GetCurrentHostThreadID();
652} 656}
653 657
658std::span<GPUDirtyMemoryManager> System::GetGPUDirtyMemoryManager() {
659 return impl->gpu_dirty_memory_managers;
660}
661
654void System::GatherGPUDirtyMemory(std::function<void(PAddr, size_t)>& callback) { 662void System::GatherGPUDirtyMemory(std::function<void(PAddr, size_t)>& callback) {
655 return this->ApplicationProcess()->GatherGPUDirtyMemory(callback); 663 for (auto& manager : impl->gpu_dirty_memory_managers) {
664 manager.Gather(callback);
665 }
656} 666}
657 667
658PerfStatsResults System::GetAndResetPerfStats() { 668PerfStatsResults System::GetAndResetPerfStats() {