summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-07-31 03:08:36 +0200
committerSubv <subv2112@gmail.com>2018-07-31 03:08:36 +0200
commit2482aca7c32679339b2c79cb7f1d46234539a9ef (patch)
tree92f7979f9fbadf1aae49f73156c3478d2cb5c2f3 /src/core/hle
parentMerge pull request #827 from lioncash/log (diff)
downloadyuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.tar
yuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.tar.gz
yuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.tar.bz2
yuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.tar.lz
yuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.tar.xz
yuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.tar.zst
yuzu-2482aca7c32679339b2c79cb7f1d46234539a9ef.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
index 44e062f50..010072a5b 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
@@ -97,7 +97,9 @@ u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>&
u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output) {
LOG_DEBUG(Service_NVDRV, "called");
IoctlActiveSlotMask params{};
- std::memcpy(&params, input.data(), input.size());
+ if (input.size() > 0) {
+ std::memcpy(&params, input.data(), input.size());
+ }
params.slot = 0x07;
params.mask = 0x01;
std::memcpy(output.data(), &params, output.size());
@@ -107,7 +109,9 @@ u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector
u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output) {
LOG_DEBUG(Service_NVDRV, "called");
IoctlZcullGetCtxSize params{};
- std::memcpy(&params, input.data(), input.size());
+ if (input.size() > 0) {
+ std::memcpy(&params, input.data(), input.size());
+ }
params.size = 0x1;
std::memcpy(output.data(), &params, output.size());
return 0;
@@ -116,7 +120,11 @@ u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u
u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) {
LOG_DEBUG(Service_NVDRV, "called");
IoctlNvgpuGpuZcullGetInfoArgs params{};
- std::memcpy(&params, input.data(), input.size());
+
+ if (input.size() > 0) {
+ std::memcpy(&params, input.data(), input.size());
+ }
+
params.width_align_pixels = 0x20;
params.height_align_pixels = 0x20;
params.pixel_squares_by_aliquots = 0x400;