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
This commit is contained in:
parent
848cda1837
commit
9426ef3f06
75 changed files with 2798 additions and 2005 deletions
|
@ -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(() =>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue