diff options
| author | 2023-12-24 18:20:02 +0100 | |
|---|---|---|
| committer | 2024-01-18 21:12:30 -0500 | |
| commit | 7a9d1ad2f873003e6aad637e8749b77b91247da3 (patch) | |
| tree | e167a5d5ad73dbd78dc4b5c165b12a1220a167f4 /src/video_core/host1x | |
| parent | Core: Initial implementation of device memory mapping (diff) | |
| download | yuzu-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.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/host1x/host1x.h | 18 |
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 { | |||
| 9 | namespace Host1x { | 9 | namespace Host1x { |
| 10 | 10 | ||
| 11 | Host1x::Host1x(Core::System& system_) | 11 | Host1x::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 | ||
| 12 | namespace Core { | 11 | namespace Core { |
| 13 | class System; | 12 | class 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 | |||
| 48 | private: | 39 | private: |
| 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 |