From 9e50ed53e67f4bdc58aed37d116b289c70abd312 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 13 May 2018 22:10:45 -0300 Subject: [PATCH] Implement GetTpcMasks on nvservices --- .../OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs | 3 ++- Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs index 68664912..04c4c9cd 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuGetTpcMasks.cs @@ -5,6 +5,7 @@ public int MaskBufferSize; public int Reserved; public long MaskBufferAddress; - public long Unk; + public int TpcMask; + public int Padding; } } diff --git a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs index 9af9ad59..b34d346b 100644 --- a/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs +++ b/Ryujinx.Core/OsHle/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs @@ -140,7 +140,14 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuGpu long InputPosition = Context.Request.GetBufferType0x21Position(); long OutputPosition = Context.Request.GetBufferType0x22Position(); - Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + NvGpuGpuGetTpcMasks Args = AMemoryHelper.Read(Context.Memory, InputPosition); + + if (Args.MaskBufferSize != 0) + { + Args.TpcMask = 3; + } + + AMemoryHelper.Write(Context.Memory, OutputPosition, Args); return NvResult.Success; }