summaryrefslogtreecommitdiffstats
path: root/src/video_core/guest_memory.h
blob: 8b621317293617c54d95ed8acb3182fa9bfe4a02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <iterator>
#include <memory>
#include <optional>
#include <span>
#include <vector>

#include "common/scratch_buffer.h"
#include "core/guest_memory.h"
#include "video_core/memory_manager.h"

namespace Tegra::Memory {

using GuestMemoryFlags = Core::Memory::GuestMemoryFlags;

template <typename T, GuestMemoryFlags FLAGS>
using DeviceGuestMemory = Core::Memory::GuestMemory<Tegra::MaxwellDeviceMemoryManager, T, FLAGS>;
template <typename T, GuestMemoryFlags FLAGS>
using DeviceGuestMemoryScoped =
    Core::Memory::GuestMemoryScoped<Tegra::MaxwellDeviceMemoryManager, T, FLAGS>;
template <typename T, GuestMemoryFlags FLAGS>
using GpuGuestMemory = Core::Memory::GuestMemory<Tegra::MemoryManager, T, FLAGS>;
template <typename T, GuestMemoryFlags FLAGS>
using GpuGuestMemoryScoped = Core::Memory::GuestMemoryScoped<Tegra::MemoryManager, T, FLAGS>;

} // namespace Tegra::Memory