diff options
| author | 2024-01-22 10:55:39 -0500 | |
|---|---|---|
| committer | 2024-01-22 10:55:39 -0500 | |
| commit | 8bd10473d60503c7acddc399604a51b9c9947541 (patch) | |
| tree | f713f84942681321fca27ba028e31d6c74a09013 /src/core/core.cpp | |
| parent | Merge pull request #12747 from t895/homescreen-widget (diff) | |
| parent | device_memory_manager: use unique_lock for update (diff) | |
| download | yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.gz yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.xz yuzu-8bd10473d60503c7acddc399604a51b9c9947541.zip | |
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 @@ | |||
| 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 | ||
| 654 | void System::GatherGPUDirtyMemory(std::function<void(VAddr, size_t)>& callback) { | 658 | std::span<GPUDirtyMemoryManager> System::GetGPUDirtyMemoryManager() { |
| 655 | return this->ApplicationProcess()->GatherGPUDirtyMemory(callback); | 659 | return impl->gpu_dirty_memory_managers; |
| 660 | } | ||
| 661 | |||
| 662 | void System::GatherGPUDirtyMemory(std::function<void(PAddr, size_t)>& callback) { | ||
| 663 | for (auto& manager : impl->gpu_dirty_memory_managers) { | ||
| 664 | manager.Gather(callback); | ||
| 665 | } | ||
| 656 | } | 666 | } |
| 657 | 667 | ||
| 658 | PerfStatsResults System::GetAndResetPerfStats() { | 668 | PerfStatsResults System::GetAndResetPerfStats() { |