diff options
Diffstat (limited to 'src/video_core/host1x/host1x.h')
| -rw-r--r-- | src/video_core/host1x/host1x.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/video_core/host1x/host1x.h b/src/video_core/host1x/host1x.h new file mode 100644 index 000000000..57082ae54 --- /dev/null +++ b/src/video_core/host1x/host1x.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | // SPDX-FileCopyrightText: 2021 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "common/common_types.h" | ||
| 7 | |||
| 8 | #include "common/address_space.h" | ||
| 9 | #include "video_core/host1x/syncpoint_manager.h" | ||
| 10 | #include "video_core/memory_manager.h" | ||
| 11 | |||
| 12 | namespace Core { | ||
| 13 | class System; | ||
| 14 | } // namespace Core | ||
| 15 | |||
| 16 | namespace Tegra { | ||
| 17 | |||
| 18 | namespace Host1x { | ||
| 19 | |||
| 20 | class Host1x { | ||
| 21 | public: | ||
| 22 | explicit Host1x(Core::System& system); | ||
| 23 | |||
| 24 | SyncpointManager& GetSyncpointManager() { | ||
| 25 | return syncpoint_manager; | ||
| 26 | } | ||
| 27 | |||
| 28 | const SyncpointManager& GetSyncpointManager() const { | ||
| 29 | return syncpoint_manager; | ||
| 30 | } | ||
| 31 | |||
| 32 | Tegra::MemoryManager& MemoryManager() { | ||
| 33 | return memory_manager; | ||
| 34 | } | ||
| 35 | |||
| 36 | const Tegra::MemoryManager& MemoryManager() const { | ||
| 37 | return memory_manager; | ||
| 38 | } | ||
| 39 | |||
| 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: | ||
| 49 | Core::System& system; | ||
| 50 | SyncpointManager syncpoint_manager; | ||
| 51 | Tegra::MemoryManager memory_manager; | ||
| 52 | std::unique_ptr<Common::FlatAllocator<u32, 0, 32>> allocator; | ||
| 53 | }; | ||
| 54 | |||
| 55 | } // namespace Host1x | ||
| 56 | |||
| 57 | } // namespace Tegra | ||