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