summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-03 08:39:37 +0200
committerbunnei <bunneidev@gmail.com>2020-06-05 04:32:28 +0200
commit1adf640d372524edd4d4c528c915be9b8b7ff8ab (patch)
tree3f55c7e68d688cd89c787f49978ad0ceb145ff67 /src
parentnvdrv: Stub nvdec/vic ioctls to bypass nvdec movies (diff)
downloadyuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.tar
yuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.tar.gz
yuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.tar.bz2
yuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.tar.lz
yuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.tar.xz
yuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.tar.zst
yuzu-1adf640d372524edd4d4c528c915be9b8b7ff8ab.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_vic.cpp4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_vic.h15
2 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
index fea363a53..9da19ad56 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
@@ -53,6 +53,10 @@ u32 nvhost_vic::Submit(const std::vector<u8>& input, std::vector<u8>& output) {
IoctlSubmit params{};
std::memcpy(&params, input.data(), sizeof(IoctlSubmit));
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
+
+ // Workaround for Luigi's Mansion 3, as nvhost_vic is not implemented for asynch GPU
+ params.command_buffer = {};
+
std::memcpy(output.data(), &params, sizeof(IoctlSubmit));
return 0;
}
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.h b/src/core/hle/service/nvdrv/devices/nvhost_vic.h
index 6854f26dd..a7bb7bbd5 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_vic.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.h
@@ -4,6 +4,7 @@
#pragma once
+#include <array>
#include <vector>
#include "common/common_types.h"
#include "common/swap.h"
@@ -36,8 +37,20 @@ private:
};
static_assert(sizeof(IoctlSetNvmapFD) == 4, "IoctlSetNvmapFD is incorrect size");
+ struct IoctlSubmitCommandBuffer {
+ u32 id;
+ u32 offset;
+ u32 count;
+ };
+ static_assert(sizeof(IoctlSubmitCommandBuffer) == 0xC,
+ "IoctlSubmitCommandBuffer is incorrect size");
+
struct IoctlSubmit {
- INSERT_PADDING_BYTES(0x40); // TODO(DarkLordZach): RE this structure
+ u32 command_buffer_count;
+ u32 relocations_count;
+ u32 syncpt_count;
+ u32 wait_count;
+ std::array<IoctlSubmitCommandBuffer, 4> command_buffer;
};
static_assert(sizeof(IoctlSubmit) == 0x40, "IoctlSubmit is incorrect size");