From b01698775b468a04e4d0a9bdd86035ff00e6decb Mon Sep 17 00:00:00 2001 From: liamwhite Date: Thu, 2 Feb 2023 15:53:28 -0500 Subject: Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" --- src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h') 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 1aba8d579..86fe71c75 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h @@ -47,12 +47,12 @@ public: explicit nvhost_as_gpu(Core::System& system_, Module& module, NvCore::Container& core); ~nvhost_as_gpu() override; - NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, + NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input, std::vector& output) override; - NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + NvResult Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input, + const std::vector& inline_input, std::vector& output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input, + std::vector& output, std::vector& inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -138,17 +138,17 @@ private: static_assert(sizeof(IoctlGetVaRegions) == 16 + sizeof(VaRegion) * 2, "IoctlGetVaRegions is incorrect size"); - NvResult AllocAsEx(std::span input, std::vector& output); - NvResult AllocateSpace(std::span input, std::vector& output); - NvResult Remap(std::span input, std::vector& output); - NvResult MapBufferEx(std::span input, std::vector& output); - NvResult UnmapBuffer(std::span input, std::vector& output); - NvResult FreeSpace(std::span input, std::vector& output); - NvResult BindChannel(std::span input, std::vector& output); + NvResult AllocAsEx(const std::vector& input, std::vector& output); + NvResult AllocateSpace(const std::vector& input, std::vector& output); + NvResult Remap(const std::vector& input, std::vector& output); + NvResult MapBufferEx(const std::vector& input, std::vector& output); + NvResult UnmapBuffer(const std::vector& input, std::vector& output); + NvResult FreeSpace(const std::vector& input, std::vector& output); + NvResult BindChannel(const std::vector& input, std::vector& output); void GetVARegionsImpl(IoctlGetVaRegions& params); - NvResult GetVARegions(std::span input, std::vector& output); - NvResult GetVARegions(std::span input, std::vector& output, + NvResult GetVARegions(const std::vector& input, std::vector& output); + NvResult GetVARegions(const std::vector& input, std::vector& output, std::vector& inline_output); void FreeMappingLocked(u64 offset); -- cgit v1.2.3