diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-22 10:55:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 10:55:39 -0500 |
commit | 8bd10473d60503c7acddc399604a51b9c9947541 (patch) | |
tree | f713f84942681321fca27ba028e31d6c74a09013 /src/core/core.cpp | |
parent | 8d708b0c79967aabb1f779433a1ec63ea5c9c6f0 (diff) | |
parent | 748465f5a578fcd99f91e0591ac773940172a72e (diff) |
Merge pull request #12579 from FernandoS27/smmu
Core: Implement Device Mapping & GPU SMMU
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 461eea9c8..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(); } -void System::GatherGPUDirtyMemory(std::function<void(VAddr, size_t)>& callback) { - return this->ApplicationProcess()->GatherGPUDirtyMemory(callback); +std::span<GPUDirtyMemoryManager> System::GetGPUDirtyMemoryManager() { + return impl->gpu_dirty_memory_managers; +} + +void System::GatherGPUDirtyMemory(std::function<void(PAddr, size_t)>& callback) { + for (auto& manager : impl->gpu_dirty_memory_managers) { + manager.Gather(callback); + } } PerfStatsResults System::GetAndResetPerfStats() { |