summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index 06c256d5d..9d37b971a 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -4,18 +4,25 @@
#pragma once
+#include <memory>
+#include <utility>
#include <vector>
#include "common/common_types.h"
#include "common/swap.h"
#include "core/hle/service/nvdrv/devices/nvdevice.h"
+#include "core/hle/service/nvdrv/memory_manager.h"
namespace Service {
namespace Nvidia {
namespace Devices {
+class nvmap;
+
class nvhost_as_gpu final : public nvdevice {
public:
- nvhost_as_gpu() = default;
+ nvhost_as_gpu(std::shared_ptr<nvmap> nvmap_dev) : nvdevice(), nvmap_dev(std::move(nvmap_dev)) {
+ memory_manager = std::make_shared<MemoryManager>();
+ }
~nvhost_as_gpu() override = default;
u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override;
@@ -92,6 +99,9 @@ private:
u32 MapBufferEx(const std::vector<u8>& input, std::vector<u8>& output);
u32 BindChannel(const std::vector<u8>& input, std::vector<u8>& output);
u32 GetVARegions(const std::vector<u8>& input, std::vector<u8>& output);
+
+ std::shared_ptr<nvmap> nvmap_dev;
+ std::shared_ptr<MemoryManager> memory_manager;
};
} // namespace Devices