Archived
1
0
Fork 0
forked from Mirror/Ryujinx

Stub VSMS related ioctls (#6313)

* Stub VSMS related ioctls

* Clean up usings
This commit is contained in:
gdkchan 2024-02-15 15:48:22 -03:00 committed by GitHub
parent dfb14a5607
commit d1a093e5ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 57 additions and 0 deletions

View file

@ -50,6 +50,12 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu
case 0x06: case 0x06:
result = CallIoctlMethod<GetTpcMasksArguments>(GetTpcMasks, arguments); result = CallIoctlMethod<GetTpcMasksArguments>(GetTpcMasks, arguments);
break; break;
case 0x12:
result = CallIoctlMethod<NumVsmsArguments>(NumVsms, arguments);
break;
case 0x13:
result = CallIoctlMethod<VsmsMappingArguments>(VsmsMapping, arguments);
break;
case 0x14: case 0x14:
result = CallIoctlMethod<GetActiveSlotMaskArguments>(GetActiveSlotMask, arguments); result = CallIoctlMethod<GetActiveSlotMaskArguments>(GetActiveSlotMask, arguments);
break; break;
@ -76,6 +82,12 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu
case 0x06: case 0x06:
result = CallIoctlMethod<GetTpcMasksArguments, int>(GetTpcMasks, arguments, inlineOutBuffer); result = CallIoctlMethod<GetTpcMasksArguments, int>(GetTpcMasks, arguments, inlineOutBuffer);
break; break;
case 0x12:
result = CallIoctlMethod<NumVsmsArguments>(NumVsms, arguments);
break;
case 0x13:
result = CallIoctlMethod<VsmsMappingArguments>(VsmsMapping, arguments);
break;
} }
} }
@ -216,6 +228,27 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu
return NvInternalResult.Success; return NvInternalResult.Success;
} }
private NvInternalResult NumVsms(ref NumVsmsArguments arguments)
{
Logger.Stub?.PrintStub(LogClass.ServiceNv);
arguments.NumVsms = 2;
return NvInternalResult.Success;
}
private NvInternalResult VsmsMapping(ref VsmsMappingArguments arguments)
{
Logger.Stub?.PrintStub(LogClass.ServiceNv);
arguments.Sm0GpcIndex = 0;
arguments.Sm0TpcIndex = 0;
arguments.Sm1GpcIndex = 0;
arguments.Sm1TpcIndex = 1;
return NvInternalResult.Success;
}
private NvInternalResult GetActiveSlotMask(ref GetActiveSlotMaskArguments arguments) private NvInternalResult GetActiveSlotMask(ref GetActiveSlotMaskArguments arguments)
{ {
Logger.Stub?.PrintStub(LogClass.ServiceNv); Logger.Stub?.PrintStub(LogClass.ServiceNv);

View file

@ -0,0 +1,11 @@
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
{
[StructLayout(LayoutKind.Sequential)]
struct NumVsmsArguments
{
public uint NumVsms;
public uint Reserved;
}
}

View file

@ -0,0 +1,13 @@
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu.Types
{
[StructLayout(LayoutKind.Sequential)]
struct VsmsMappingArguments
{
public byte Sm0GpcIndex;
public byte Sm0TpcIndex;
public byte Sm1GpcIndex;
public byte Sm1TpcIndex;
}
}