diff options
| author | 2023-12-21 00:04:03 +0100 | |
|---|---|---|
| committer | 2024-01-18 21:12:30 -0500 | |
| commit | 2f0418c10134b4c8e5ae47ace623b5db57c0435c (patch) | |
| tree | 775c82e0b3b07090b1a3c83859bebe2c0f0e1369 /src/video_core/host1x | |
| parent | Merge pull request #12702 from german77/android-input (diff) | |
| download | yuzu-2f0418c10134b4c8e5ae47ace623b5db57c0435c.tar.gz yuzu-2f0418c10134b4c8e5ae47ace623b5db57c0435c.tar.xz yuzu-2f0418c10134b4c8e5ae47ace623b5db57c0435c.zip | |
Core: Initial implementation of device memory mapping
Diffstat (limited to 'src/video_core/host1x')
| -rw-r--r-- | src/video_core/host1x/gpu_device_memory_manager.cpp | 21 | ||||
| -rw-r--r-- | src/video_core/host1x/gpu_device_memory_manager.h | 20 |
2 files changed, 41 insertions, 0 deletions
diff --git a/src/video_core/host1x/gpu_device_memory_manager.cpp b/src/video_core/host1x/gpu_device_memory_manager.cpp new file mode 100644 index 000000000..2ca445081 --- /dev/null +++ b/src/video_core/host1x/gpu_device_memory_manager.cpp | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | // SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/device_memory_manager.inc" | ||
| 5 | #include "video_core/host1x/gpu_device_memory_manager.h" | ||
| 6 | #include "video_core/rasterizer_interface.h" | ||
| 7 | |||
| 8 | template struct Core::DeviceMemoryManagerAllocator<Tegra::MaxwellDeviceTraits>; | ||
| 9 | template class Core::DeviceMemoryManager<Tegra::MaxwellDeviceTraits>; | ||
| 10 | |||
| 11 | template const u8* Tegra::MaxwellDeviceMemoryManager::GetPointer<u8>(DAddr addr) const; | ||
| 12 | template u8* Tegra::MaxwellDeviceMemoryManager::GetPointer<u8>(DAddr addr); | ||
| 13 | |||
| 14 | template u8 Tegra::MaxwellDeviceMemoryManager::Read<u8>(DAddr addr) const; | ||
| 15 | template u16 Tegra::MaxwellDeviceMemoryManager::Read<u16>(DAddr addr) const; | ||
| 16 | template u32 Tegra::MaxwellDeviceMemoryManager::Read<u32>(DAddr addr) const; | ||
| 17 | template u64 Tegra::MaxwellDeviceMemoryManager::Read<u64>(DAddr addr) const; | ||
| 18 | template void Tegra::MaxwellDeviceMemoryManager::Write<u8>(DAddr addr, u8 data); | ||
| 19 | template void Tegra::MaxwellDeviceMemoryManager::Write<u16>(DAddr addr, u16 data); | ||
| 20 | template void Tegra::MaxwellDeviceMemoryManager::Write<u32>(DAddr addr, u32 data); | ||
| 21 | template void Tegra::MaxwellDeviceMemoryManager::Write<u64>(DAddr addr, u64 data); \ No newline at end of file | ||
diff --git a/src/video_core/host1x/gpu_device_memory_manager.h b/src/video_core/host1x/gpu_device_memory_manager.h new file mode 100644 index 000000000..30ad52017 --- /dev/null +++ b/src/video_core/host1x/gpu_device_memory_manager.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | // SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/device_memory_manager.h" | ||
| 5 | |||
| 6 | namespace VideoCore { | ||
| 7 | class RasterizerInterface; | ||
| 8 | } | ||
| 9 | |||
| 10 | namespace Tegra { | ||
| 11 | |||
| 12 | struct MaxwellDeviceTraits { | ||
| 13 | static constexpr bool supports_pinning = true; | ||
| 14 | static constexpr size_t device_virtual_bits = 34; | ||
| 15 | using DeviceInterface = typename VideoCore::RasterizerInterface; | ||
| 16 | }; | ||
| 17 | |||
| 18 | using MaxwellDeviceMemoryManager = Core::DeviceMemoryManager<MaxwellDeviceTraits>; | ||
| 19 | |||
| 20 | } // namespace Tegra \ No newline at end of file | ||