aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Macabeus <macabeus@users.noreply.github.com>2021-01-13 09:53:13 +0000
committerGitHub <noreply@github.com>2021-01-13 10:53:13 +0100
commit996e6905ba0ec3d8416c9332109d0805f68167e7 (patch)
treecb454eaedc784a496961f359799e71ffba8129a6
parent36c6e67df2c06e1b71d2059461ed7fad17bfea34 (diff)
android-fence: call callback when fence is invalid (#1881)
-rw-r--r--Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs
index 62c53f2d..515efd05 100644
--- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs
+++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs
@@ -70,7 +70,14 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
{
ref NvFence fence = ref NvFences[FenceCount - 1];
- gpuContext.Synchronization.RegisterCallbackOnSyncpoint(fence.Id, fence.Value, callback);
+ if (fence.IsValid())
+ {
+ gpuContext.Synchronization.RegisterCallbackOnSyncpoint(fence.Id, fence.Value, callback);
+ }
+ else
+ {
+ callback();
+ }
}
public uint GetFlattenedSize()