yuzu-android/src/video_core/host1x/host1x.h

58 lines
1.2 KiB
C++
Raw Normal View History

// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
2022-01-30 10:31:13 +01:00
#pragma once
#include "common/common_types.h"
2022-01-30 22:26:01 +01:00
#include "common/address_space.h"
2022-01-30 10:31:13 +01:00
#include "video_core/host1x/syncpoint_manager.h"
2022-01-30 22:26:01 +01:00
#include "video_core/memory_manager.h"
namespace Core {
class System;
} // namespace Core
2022-01-30 10:31:13 +01:00
namespace Tegra {
namespace Host1x {
class Host1x {
public:
2022-09-01 05:45:22 +02:00
explicit Host1x(Core::System& system);
2022-01-30 10:31:13 +01:00
SyncpointManager& GetSyncpointManager() {
return syncpoint_manager;
}
const SyncpointManager& GetSyncpointManager() const {
return syncpoint_manager;
}
2022-01-30 22:26:01 +01:00
Tegra::MemoryManager& MemoryManager() {
return memory_manager;
}
const Tegra::MemoryManager& MemoryManager() const {
return memory_manager;
}
Common::FlatAllocator<u32, 0, 32>& Allocator() {
return *allocator;
}
const Common::FlatAllocator<u32, 0, 32>& Allocator() const {
return *allocator;
}
2022-01-30 10:31:13 +01:00
private:
2022-01-30 22:26:01 +01:00
Core::System& system;
2022-01-30 10:31:13 +01:00
SyncpointManager syncpoint_manager;
2022-01-30 22:26:01 +01:00
Tegra::MemoryManager memory_manager;
std::unique_ptr<Common::FlatAllocator<u32, 0, 32>> allocator;
2022-01-30 10:31:13 +01:00
};
} // namespace Host1x
} // namespace Tegra