summaryrefslogtreecommitdiff
path: root/src/video_core/host1x
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2023-12-24 18:20:02 +0100
committerGravatar Liam2024-01-18 21:12:30 -0500
commit7a9d1ad2f873003e6aad637e8749b77b91247da3 (patch)
treee167a5d5ad73dbd78dc4b5c165b12a1220a167f4 /src/video_core/host1x
parentCore: Initial implementation of device memory mapping (diff)
downloadyuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.gz
yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.tar.xz
yuzu-7a9d1ad2f873003e6aad637e8749b77b91247da3.zip
NVDRV: Implement sessions and initial implementation of SMMU
Diffstat (limited to 'src/video_core/host1x')
-rw-r--r--src/video_core/host1x/host1x.cpp3
-rw-r--r--src/video_core/host1x/host1x.h18
2 files changed, 5 insertions, 16 deletions
diff --git a/src/video_core/host1x/host1x.cpp b/src/video_core/host1x/host1x.cpp
index 7c317a85d..d05bcaf26 100644
--- a/src/video_core/host1x/host1x.cpp
+++ b/src/video_core/host1x/host1x.cpp
@@ -9,8 +9,7 @@ namespace Tegra {
9namespace Host1x { 9namespace Host1x {
10 10
11Host1x::Host1x(Core::System& system_) 11Host1x::Host1x(Core::System& system_)
12 : system{system_}, syncpoint_manager{}, memory_manager{system, 32, 12}, 12 : system{system_}, syncpoint_manager{}, memory_manager(system.DeviceMemory()) {}
13 allocator{std::make_unique<Common::FlatAllocator<u32, 0, 32>>(1 << 12)} {}
14 13
15} // namespace Host1x 14} // namespace Host1x
16 15
diff --git a/src/video_core/host1x/host1x.h b/src/video_core/host1x/host1x.h
index 57082ae54..18f7389f6 100644
--- a/src/video_core/host1x/host1x.h
+++ b/src/video_core/host1x/host1x.h
@@ -5,9 +5,8 @@
5 5
6#include "common/common_types.h" 6#include "common/common_types.h"
7 7
8#include "common/address_space.h" 8#include "video_core/host1x/gpu_device_memory_manager.h"
9#include "video_core/host1x/syncpoint_manager.h" 9#include "video_core/host1x/syncpoint_manager.h"
10#include "video_core/memory_manager.h"
11 10
12namespace Core { 11namespace Core {
13class System; 12class System;
@@ -29,27 +28,18 @@ public:
29 return syncpoint_manager; 28 return syncpoint_manager;
30 } 29 }
31 30
32 Tegra::MemoryManager& MemoryManager() { 31 Tegra::MaxwellDeviceMemoryManager& MemoryManager() {
33 return memory_manager; 32 return memory_manager;
34 } 33 }
35 34
36 const Tegra::MemoryManager& MemoryManager() const { 35 const Tegra::MaxwellDeviceMemoryManager& MemoryManager() const {
37 return memory_manager; 36 return memory_manager;
38 } 37 }
39 38
40 Common::FlatAllocator<u32, 0, 32>& Allocator() {
41 return *allocator;
42 }
43
44 const Common::FlatAllocator<u32, 0, 32>& Allocator() const {
45 return *allocator;
46 }
47
48private: 39private:
49 Core::System& system; 40 Core::System& system;
50 SyncpointManager syncpoint_manager; 41 SyncpointManager syncpoint_manager;
51 Tegra::MemoryManager memory_manager; 42 Tegra::MaxwellDeviceMemoryManager memory_manager;
52 std::unique_ptr<Common::FlatAllocator<u32, 0, 32>> allocator;
53}; 43};
54 44
55} // namespace Host1x 45} // namespace Host1x