Update nvdrv perms to 11.0.0+ & Implement nvdrv:a service

`nvdrv:a` (For Applets) is used by some older homebrew such as SpaceNX which don't fall back to `nvdrv` (For Applications).
This commit is contained in:
PixelyIon 2021-10-16 12:59:59 +01:00
parent 3b4bbd2b38
commit c8821c7313
2 changed files with 13 additions and 0 deletions

View File

@ -38,10 +38,22 @@ namespace skyline::service::nvdrv {
.AccessGpu = true, .AccessGpu = true,
.AccessGpuDebug = true, .AccessGpuDebug = true,
.AccessVic = true, .AccessVic = true,
.AccessVideoEncoder = true, // Enabled in 11.0.0+
.AccessVideoDecoder = true, .AccessVideoDecoder = true,
.ModifyGraphicsMargin = true .ModifyGraphicsMargin = true
}; };
/**
* @brief Permissions that applets have when using the 'nvdrv:a' service
*/
static constexpr SessionPermissions AppletSessionPermissions {
.AccessGpu = true,
.AccessVic = true,
.AccessVideoDecoder = true,
.AccessJpeg = true,
.DuplicateNvMapHandles = true
};
/** /**
* @brief A bitfield struct that unpacks an ioctl number, used as an alternative to Linux's macros * @brief A bitfield struct that unpacks an ioctl number, used as an alternative to Linux's macros
*/ */

View File

@ -81,6 +81,7 @@ namespace skyline::service {
SERVICE_CASE(glue::IStaticService, "time:u", globalServiceState->timesrv.managerServer.GetStaticServiceAsUser(state, *this), globalServiceState->timesrv, timesrv::constant::StaticServiceUserPermissions) SERVICE_CASE(glue::IStaticService, "time:u", globalServiceState->timesrv.managerServer.GetStaticServiceAsUser(state, *this), globalServiceState->timesrv, timesrv::constant::StaticServiceUserPermissions)
SERVICE_CASE(fssrv::IFileSystemProxy, "fsp-srv") SERVICE_CASE(fssrv::IFileSystemProxy, "fsp-srv")
SERVICE_CASE(nvdrv::INvDrvServices, "nvdrv", globalServiceState->nvdrv, nvdrv::ApplicationSessionPermissions) SERVICE_CASE(nvdrv::INvDrvServices, "nvdrv", globalServiceState->nvdrv, nvdrv::ApplicationSessionPermissions)
SERVICE_CASE(nvdrv::INvDrvServices, "nvdrv:a", globalServiceState->nvdrv, nvdrv::AppletSessionPermissions)
SERVICE_CASE(hosbinder::IHOSBinderDriver, "dispdrv", globalServiceState->nvdrv.core.nvMap) SERVICE_CASE(hosbinder::IHOSBinderDriver, "dispdrv", globalServiceState->nvdrv.core.nvMap)
SERVICE_CASE(visrv::IApplicationRootService, "vi:u") SERVICE_CASE(visrv::IApplicationRootService, "vi:u")
SERVICE_CASE(visrv::ISystemRootService, "vi:s") SERVICE_CASE(visrv::ISystemRootService, "vi:s")