diff --git a/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.cpp b/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.cpp index b845893f..bce3b770 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.cpp +++ b/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.cpp @@ -20,6 +20,10 @@ namespace skyline::service::nvdrv::device::nvhost { return PosixResult::Success; } + PosixResult CtrlGpu::ZbcSetTable(In colorDs, In colorL2, In depth, In format, In type) { + return PosixResult::Success; + } + PosixResult CtrlGpu::GetCharacteristics(InOut size, In userAddress, Out characteristics) { characteristics = {}; size = sizeof(GpuCharacteristics); @@ -70,6 +74,8 @@ namespace skyline::service::nvdrv::device::nvhost { ZCullGetCtxSize, ARGS(Out)) IOCTL_CASE_ARGS(OUT, SIZE(0x28), MAGIC(CtrlGpuMagic), FUNC(0x2), ZCullGetInfo, ARGS(Out)) + IOCTL_CASE_ARGS(IN, SIZE(0x2C), MAGIC(CtrlGpuMagic), FUNC(0x3), + ZbcSetTable, ARGS(In, In, In, In, In)) IOCTL_CASE_ARGS(INOUT, SIZE(0xB0), MAGIC(CtrlGpuMagic), FUNC(0x5), GetCharacteristics, ARGS(InOut, In, Out)) IOCTL_CASE_ARGS(INOUT, SIZE(0x18), MAGIC(CtrlGpuMagic), FUNC(0x6), diff --git a/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.h b/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.h index ff93b41b..9a1a92d9 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.h +++ b/app/src/main/cpp/skyline/services/nvdrv/devices/nvhost/ctrl_gpu.h @@ -73,6 +73,8 @@ namespace skyline::service::nvdrv::device::nvhost { u32 subregionCount{0x10}; }; + using ZbcColorValue = std::array; + CtrlGpu(const DeviceState &state, Driver &driver, Core &core, const SessionContext &ctx); /** @@ -87,6 +89,12 @@ namespace skyline::service::nvdrv::device::nvhost { */ PosixResult ZCullGetInfo(Out info); + /** + * @brief Sets the zero bandwidth clear parameters + * @url https://switchbrew.org/wiki/NV_services#NVGPU_GPU_IOCTL_ZBC_SET_TABLE + */ + PosixResult ZbcSetTable(In colorDs, In colorL2, In depth, In format, In type); + /** * @brief Returns a struct with certain GPU characteristics * @url https://switchbrew.org/wiki/NV_services#NVGPU_GPU_IOCTL_GET_CHARACTERISTICS