From f517f824167a6d01a65dcbb8662e4a071b5210bb Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sun, 25 Dec 2022 14:13:07 -0500 Subject: nvdrv: Use std::span for inputs Allows the use of HLERequestContext::ReadBufferSpan --- .../hle/service/nvdrv/devices/nvhost_ctrl_gpu.h | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index 1e8f254e2..b9333d9d3 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -21,12 +21,12 @@ public: explicit nvhost_ctrl_gpu(Core::System& system_, EventInterface& events_interface_); ~nvhost_ctrl_gpu() override; - NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input, + NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, std::vector& 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; + 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; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -151,21 +151,21 @@ private: }; static_assert(sizeof(IoctlGetGpuTime) == 0x10, "IoctlGetGpuTime is incorrect size"); - NvResult GetCharacteristics(const std::vector& input, std::vector& output); - NvResult GetCharacteristics(const std::vector& input, std::vector& output, + NvResult GetCharacteristics(std::span input, std::vector& output); + NvResult GetCharacteristics(std::span input, std::vector& output, std::vector& inline_output); - NvResult GetTPCMasks(const std::vector& input, std::vector& output); - NvResult GetTPCMasks(const std::vector& input, std::vector& output, + NvResult GetTPCMasks(std::span input, std::vector& output); + NvResult GetTPCMasks(std::span input, std::vector& output, std::vector& inline_output); - NvResult GetActiveSlotMask(const std::vector& input, std::vector& output); - NvResult ZCullGetCtxSize(const std::vector& input, std::vector& output); - NvResult ZCullGetInfo(const std::vector& input, std::vector& output); - NvResult ZBCSetTable(const std::vector& input, std::vector& output); - NvResult ZBCQueryTable(const std::vector& input, std::vector& output); - NvResult FlushL2(const std::vector& input, std::vector& output); - NvResult GetGpuTime(const std::vector& input, std::vector& output); + NvResult GetActiveSlotMask(std::span input, std::vector& output); + NvResult ZCullGetCtxSize(std::span input, std::vector& output); + NvResult ZCullGetInfo(std::span input, std::vector& output); + NvResult ZBCSetTable(std::span input, std::vector& output); + NvResult ZBCQueryTable(std::span input, std::vector& output); + NvResult FlushL2(std::span input, std::vector& output); + NvResult GetGpuTime(std::span input, std::vector& output); EventInterface& events_interface; -- cgit v1.2.3