summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-11-04 12:51:17 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-10-06 21:00:51 +0200
commitde0e8eff429b4374c18e3325ad3747db55bddddd (patch)
tree6700091146d5282c1efbee40c94b6573c5b2895f /src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
parentNVDRV: Refactor and add new NvMap. (diff)
downloadyuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.tar
yuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.tar.gz
yuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.tar.bz2
yuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.tar.lz
yuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.tar.xz
yuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.tar.zst
yuzu-de0e8eff429b4374c18e3325ad3747db55bddddd.zip
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h12
1 files changed, 10 insertions, 2 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 555843a6f..67d2f1e87 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -13,6 +13,11 @@
#include "common/swap.h"
#include "core/hle/service/nvdrv/devices/nvdevice.h"
+namespace Service::Nvidia::NvCore {
+class Container;
+class NvMap;
+} // namespace Service::Nvidia::NvCore
+
namespace Service::Nvidia::Devices {
constexpr u32 DEFAULT_BIG_PAGE_SIZE = 1 << 16;
@@ -29,7 +34,7 @@ DECLARE_ENUM_FLAG_OPERATORS(AddressSpaceFlags);
class nvhost_as_gpu final : public nvdevice {
public:
- explicit nvhost_as_gpu(Core::System& system_, std::shared_ptr<nvmap> nvmap_dev_);
+ explicit nvhost_as_gpu(Core::System& system_, NvCore::Container& core);
~nvhost_as_gpu() override;
NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector<u8>& input,
@@ -42,6 +47,8 @@ public:
void OnOpen(DeviceFD fd) override;
void OnClose(DeviceFD fd) override;
+ Kernel::KEvent* QueryEvent(u32 event_id) override;
+
private:
class BufferMap final {
public:
@@ -180,7 +187,8 @@ private:
void AddBufferMap(GPUVAddr gpu_addr, std::size_t size, VAddr cpu_addr, bool is_allocated);
std::optional<std::size_t> RemoveBufferMap(GPUVAddr gpu_addr);
- std::shared_ptr<nvmap> nvmap_dev;
+ NvCore::Container& container;
+ NvCore::NvMap& nvmap;
// This is expected to be ordered, therefore we must use a map, not unordered_map
std::map<GPUVAddr, BufferMap> buffer_mappings;