From 525492428d3b1ccbe2096944a7525b242d4c9e7b Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 20 May 2018 14:23:49 -0500 Subject: GPU: Implemented the nvmap Free ioctl. It releases a reference to an nvmap object --- src/core/hle/service/nvdrv/devices/nvmap.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/nvdrv/devices/nvmap.h') diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h index 431eb3773..5a3044167 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.h +++ b/src/core/hle/service/nvdrv/devices/nvmap.h @@ -34,6 +34,7 @@ public: u8 kind; VAddr addr; Status status; + u32 refcount; }; std::shared_ptr GetObject(u32 handle) const { @@ -59,7 +60,8 @@ private: FromId = 0xC0080103, Alloc = 0xC0200104, Param = 0xC00C0109, - GetId = 0xC008010E + GetId = 0xC008010E, + Free = 0xC0180105, }; struct IocCreateParams { @@ -102,11 +104,21 @@ private: u32_le value; }; + struct IocFreeParams { + u32_le handle; + INSERT_PADDING_BYTES(4); + u64_le refcount; + u32_le size; + u32_le flags; + }; + static_assert(sizeof(IocFreeParams) == 24, "IocFreeParams has wrong size"); + u32 IocCreate(const std::vector& input, std::vector& output); u32 IocAlloc(const std::vector& input, std::vector& output); u32 IocGetId(const std::vector& input, std::vector& output); u32 IocFromId(const std::vector& input, std::vector& output); u32 IocParam(const std::vector& input, std::vector& output); + u32 IocFree(const std::vector& input, std::vector& output); }; } // namespace Service::Nvidia::Devices -- cgit v1.2.3