From 9426ef3f06916f4206213b28b1ca162c851d4e07 Mon Sep 17 00:00:00 2001 From: Thomas Guillemard Date: Sat, 2 Nov 2019 23:47:56 +0100 Subject: Rewrite nvservices (#800) * Start rewriting nvservices internals TODO: - nvgpu device interface - nvhost generic device interface * Some clean up and fixes - Make sure to remove the fd of a closed channel. - NvFileDevice now doesn't implement Disposable as it was never used. - Rename NvHostCtrlGetConfigurationArgument to GetConfigurationArguments to follow calling convention. - Make sure to check every ioctls magic. * Finalize migration for ioctl standard variant TODO: ioctl2 migration * Implement SubmitGpfifoEx and fix nvdec * Implement Ioctl3 * Implement some ioctl3 required by recent games * Remove unused code and outdated comments * Return valid event handles with QueryEvent Also add an exception for unimplemented event ids. This commit doesn't implement accurately the events, this only define different events for different event ids. * Rename all occurance of FileDevice to DeviceFile * Restub SetClientPid to not cause regressions * Address comments * Remove GlobalStateTable * Address comments * Align variables in ioctl3 * Some missing alignments * GetVaRegionsArguments realign * Make Owner public in NvDeviceFile * Address LDj3SNuD's comments --- Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Android') diff --git a/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs index 5580c3be..63df78e5 100644 --- a/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Memory; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvGpuAS; +using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; using System; using System.Collections.Generic; @@ -290,7 +290,7 @@ namespace Ryujinx.HLE.HOS.Services.Android int bufferOffset = _bufferQueue[slot].Data.Buffer.Surfaces[0].Offset; - NvMapHandle map = NvMapIoctl.GetNvMap(context, nvMapHandle); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(context.Process, nvMapHandle); long fbAddr = map.Address + bufferOffset; @@ -312,7 +312,7 @@ namespace Ryujinx.HLE.HOS.Services.Android int right = crop.Right; int bottom = crop.Bottom; - NvGpuVmm vmm = NvGpuASIoctl.GetASCtx(context).Vmm; + NvGpuVmm vmm = NvHostAsGpuDeviceFile.GetAddressSpaceContext(context.Process).Vmm; _renderer.QueueAction(() => { -- cgit v1.2.3