yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Stubbed NVGPU_GPU_IOCTL_ZBC_SET_TABLE (#463)

We have no clue on what this actually does yet so stubbing it since it's just input only should be fine for now
This commit is contained in:
David 2018-05-24 15:36:12 -07:00 committed by bunnei
parent 55e6296e71
commit e3a92b09ba
2 changed files with 22 additions and 0 deletions

View File

@ -24,6 +24,8 @@ u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vec
return ZCullGetCtxSize(input, output); return ZCullGetCtxSize(input, output);
case IoctlCommand::IocZcullGetInfo: case IoctlCommand::IocZcullGetInfo:
return ZCullGetInfo(input, output); return ZCullGetInfo(input, output);
case IoctlCommand::IocZbcSetTable:
return ZBCSetTable(input, output);
} }
UNIMPLEMENTED_MSG("Unimplemented ioctl"); UNIMPLEMENTED_MSG("Unimplemented ioctl");
return 0; return 0;
@ -125,4 +127,13 @@ u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>&
return 0; return 0;
} }
u32 nvhost_ctrl_gpu::ZBCSetTable(const std::vector<u8>& input, std::vector<u8>& output) {
NGLOG_WARNING(Service_NVDRV, "(STUBBED) called");
IoctlZbcSetTable params{};
std::memcpy(&params, input.data(), input.size());
// TODO(ogniK): What does this even actually do?
std::memcpy(output.data(), &params, output.size());
return 0;
}
} // namespace Service::Nvidia::Devices } // namespace Service::Nvidia::Devices

View File

@ -25,6 +25,7 @@ private:
IocGetActiveSlotMaskCommand = 0x80084714, IocGetActiveSlotMaskCommand = 0x80084714,
IocZcullGetCtxSizeCommand = 0x80044701, IocZcullGetCtxSizeCommand = 0x80044701,
IocZcullGetInfo = 0x80284702, IocZcullGetInfo = 0x80284702,
IocZbcSetTable = 0x402C4703,
}; };
struct IoctlGpuCharacteristics { struct IoctlGpuCharacteristics {
@ -117,11 +118,21 @@ private:
static_assert(sizeof(IoctlNvgpuGpuZcullGetInfoArgs) == 40, static_assert(sizeof(IoctlNvgpuGpuZcullGetInfoArgs) == 40,
"IoctlNvgpuGpuZcullGetInfoArgs is incorrect size"); "IoctlNvgpuGpuZcullGetInfoArgs is incorrect size");
struct IoctlZbcSetTable {
u32_le color_ds[4];
u32_le color_l2[4];
u32_le depth;
u32_le format;
u32_le type;
};
static_assert(sizeof(IoctlZbcSetTable) == 44, "IoctlZbcSetTable is incorrect size");
u32 GetCharacteristics(const std::vector<u8>& input, std::vector<u8>& output); u32 GetCharacteristics(const std::vector<u8>& input, std::vector<u8>& output);
u32 GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& output); u32 GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& output);
u32 GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output); u32 GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output);
u32 ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output); u32 ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output);
u32 ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output); u32 ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output);
u32 ZBCSetTable(const std::vector<u8>& input, std::vector<u8>& output);
}; };
} // namespace Service::Nvidia::Devices } // namespace Service::Nvidia::Devices