Ensure syncpoints are released and event handles closed on channel close (#2812)

This commit is contained in:
gdkchan 2021-11-04 20:27:21 -03:00 committed by GitHub
parent f78bcb8048
commit 81e9b86cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 49 deletions

View file

@ -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)