misc: chore: Use explicit types in HLE project

This commit is contained in:
Evan Husted
2025-01-25 14:13:18 -06:00
parent 58c1ab7989
commit 5eba42fa06
80 changed files with 410 additions and 397 deletions

View File

@@ -18,8 +18,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv
MemoryAllocator = new NvMemoryAllocator();
Host1x = new Host1xDevice(gpu.Synchronization);
Smmu = gpu.CreateDeviceMemoryManager(pid);
var nvdec = new NvdecDevice(Smmu);
var vic = new VicDevice(Smmu);
NvdecDevice nvdec = new NvdecDevice(Smmu);
VicDevice vic = new VicDevice(Smmu);
Host1x.RegisterDevice(ClassId.Nvdec, nvdec);
Host1x.RegisterDevice(ClassId.Vic, vic);
}

View File

@@ -104,7 +104,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu
private NvInternalResult BindChannel(ref BindChannelArguments arguments)
{
var channelDeviceFile = INvDrvServices.DeviceFileIdRegistry.GetData<NvHostChannelDeviceFile>(arguments.Fd);
NvHostChannelDeviceFile channelDeviceFile = INvDrvServices.DeviceFileIdRegistry.GetData<NvHostChannelDeviceFile>(arguments.Fd);
if (channelDeviceFile == null)
{
// TODO: Return invalid Fd error.
@@ -336,9 +336,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu
for (uint i = 0; i < writeEntries; i++)
{
ref var region = ref arguments.Regions[(int)i];
ref VaRegion region = ref arguments.Regions[(int)i];
var vmRegion = _vmRegions[i];
VmRegion vmRegion = _vmRegions[i];
uint pageSize = _pageSizes[i];
region.PageSize = pageSize;

View File

@@ -169,7 +169,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
{
NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(Owner, commandBuffer.Mem);
var data = _memory.GetSpan(map.Address + commandBuffer.Offset, commandBuffer.WordsCount * 4);
ReadOnlySpan<byte> data = _memory.GetSpan(map.Address + commandBuffer.Offset, commandBuffer.WordsCount * 4);
_host1xContext.Host1x.Submit(MemoryMarshal.Cast<byte, int>(data), _contextId);
}