diff options
author | Mat M <mathew1800@gmail.com> | 2018-08-14 01:36:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 01:36:26 +0200 |
commit | 309564abe3c6bf9f138e8b764b63d2ac4f8e9240 (patch) | |
tree | b4fc3d98e06058cfa5f44b9927540ca6ec7213e9 /src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h | |
parent | Merge pull request #1052 from ogniK5377/xeno (diff) | |
parent | Registered missing channel devices (diff) | |
download | yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.tar yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.tar.gz yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.tar.bz2 yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.tar.lz yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.tar.xz yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.tar.zst yuzu-309564abe3c6bf9f138e8b764b63d2ac4f8e9240.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h new file mode 100644 index 000000000..2b0eb43ee --- /dev/null +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h @@ -0,0 +1,36 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <vector> +#include "common/common_types.h" +#include "common/swap.h" +#include "core/hle/service/nvdrv/devices/nvdevice.h" + +namespace Service::Nvidia::Devices { + +class nvhost_nvjpg final : public nvdevice { +public: + nvhost_nvjpg() = default; + ~nvhost_nvjpg() override = default; + + u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; + +private: + enum class IoctlCommand : u32_le { + IocSetNVMAPfdCommand = 0x40044801, + }; + + struct IoctlSetNvmapFD { + u32_le nvmap_fd; + }; + static_assert(sizeof(IoctlSetNvmapFD) == 4, "IoctlSetNvmapFD is incorrect size"); + + u32_le nvmap_fd{}; + + u32 SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output); +}; + +} // namespace Service::Nvidia::Devices |