summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-08-13 06:00:27 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2018-08-13 06:00:27 +0200
commit92492ee23be1a71eede7becbbea17994f9261022 (patch)
treeab2ffadb9430b92814895fcbce0fc6b6c28a285f /src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
parentMerge pull request #1044 from bunnei/linestrip (diff)
downloadyuzu-92492ee23be1a71eede7becbbea17994f9261022.tar
yuzu-92492ee23be1a71eede7becbbea17994f9261022.tar.gz
yuzu-92492ee23be1a71eede7becbbea17994f9261022.tar.bz2
yuzu-92492ee23be1a71eede7becbbea17994f9261022.tar.lz
yuzu-92492ee23be1a71eede7becbbea17994f9261022.tar.xz
yuzu-92492ee23be1a71eede7becbbea17994f9261022.tar.zst
yuzu-92492ee23be1a71eede7becbbea17994f9261022.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_vic.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
new file mode 100644
index 000000000..fcb488d50
--- /dev/null
+++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
@@ -0,0 +1,34 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include <cstring>
+
+#include "common/assert.h"
+#include "common/logging/log.h"
+#include "core/hle/service/nvdrv/devices/nvhost_vic.h"
+
+namespace Service::Nvidia::Devices {
+
+u32 nvhost_vic::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
+ LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}",
+ command.raw, input.size(), output.size());
+
+ switch (static_cast<IoctlCommand>(command.raw)) {
+ case IoctlCommand::IocSetNVMAPfdCommand:
+ return SetNVMAPfd(input, output);
+ }
+
+ UNIMPLEMENTED_MSG("Unimplemented ioctl");
+ return 0;
+}
+
+u32 nvhost_vic::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) {
+ IoctlSetNvmapFD params{};
+ std::memcpy(&params, input.data(), input.size());
+ LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd);
+ nvmap_fd = params.nvmap_fd;
+ return 0;
+}
+
+} // namespace Service::Nvidia::Devices