aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-11-04 20:27:21 -0300
committerGitHub <noreply@github.com>2021-11-04 20:27:21 -0300
commit81e9b86cdb4b2a01cc41b8e8a4dff2c9e3c13843 (patch)
treec3f8a9c5f56b8f994ac6a52cf8265b52b43566cf /Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs
parentf78bcb80485419466fde56812425a53e22705765 (diff)
Ensure syncpoints are released and event handles closed on channel close (#2812)
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs
index 3d999030..edf55438 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs
@@ -542,6 +542,18 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel
{
_host1xContext.Host1x.DestroyContext(_contextId);
Channel.Dispose();
+
+ for (int i = 0; i < MaxModuleSyncpoint; i++)
+ {
+ if (ChannelSyncpoints[i] != 0)
+ {
+ _device.System.HostSyncpoint.ReleaseSyncpoint(ChannelSyncpoints[i]);
+ ChannelSyncpoints[i] = 0;
+ }
+ }
+
+ _device.System.HostSyncpoint.ReleaseSyncpoint(_channelSyncpoint.Id);
+ _channelSyncpoint.Id = 0;
}
private static Host1xContext GetHost1XContext(GpuContext gpu, long pid)