2022-06-29 23:27:49 +00:00
|
|
|
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2022-01-30 09:31:13 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
2022-01-30 21:26:01 +00:00
|
|
|
#include "common/address_space.h"
|
2022-01-30 09:31:13 +00:00
|
|
|
#include "video_core/host1x/syncpoint_manager.h"
|
2022-01-30 21:26:01 +00:00
|
|
|
#include "video_core/memory_manager.h"
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
class System;
|
|
|
|
} // namespace Core
|
2022-01-30 09:31:13 +00:00
|
|
|
|
|
|
|
namespace Tegra {
|
|
|
|
|
|
|
|
namespace Host1x {
|
|
|
|
|
|
|
|
class Host1x {
|
|
|
|
public:
|
2022-01-30 21:26:01 +00:00
|
|
|
Host1x(Core::System& system);
|
2022-01-30 09:31:13 +00:00
|
|
|
|
|
|
|
SyncpointManager& GetSyncpointManager() {
|
|
|
|
return syncpoint_manager;
|
|
|
|
}
|
|
|
|
|
|
|
|
const SyncpointManager& GetSyncpointManager() const {
|
|
|
|
return syncpoint_manager;
|
|
|
|
}
|
|
|
|
|
2022-01-30 21:26:01 +00: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 09:31:13 +00:00
|
|
|
private:
|
2022-01-30 21:26:01 +00:00
|
|
|
Core::System& system;
|
2022-01-30 09:31:13 +00:00
|
|
|
SyncpointManager syncpoint_manager;
|
2022-01-30 21:26:01 +00:00
|
|
|
Tegra::MemoryManager memory_manager;
|
|
|
|
std::unique_ptr<Common::FlatAllocator<u32, 0, 32>> allocator;
|
2022-01-30 09:31:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Host1x
|
|
|
|
|
|
|
|
} // namespace Tegra
|