1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02:00

surfaceflinger: Fix fence callback issue (#1839)

This PR fixes a regression introduced in #1741. The actual implementation do the assumption of fences always exist and then registering the callback.
Homebrews may not use fences, so the code crashes when it try to register the callback.
This commit is contained in:
Ac_K 2021-01-02 23:21:44 +01:00 committed by GitHub
parent 3e7383b3fd
commit 4f01c13f50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,14 +345,22 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
TextureCallbackInformation textureCallbackInformation = new TextureCallbackInformation
{
Layer = layer,
Item = item,
Item = item
};
if (item.Fence.FenceCount == 0)
{
_device.Gpu.Window.SignalFrameReady();
_device.Gpu.GPFifo.Interrupt();
}
else
{
item.Fence.RegisterCallback(_device.Gpu, () =>
{
_device.Gpu.Window.SignalFrameReady();
_device.Gpu.GPFifo.Interrupt();
});
}
_device.Gpu.Window.EnqueueFrameThreadSafe(
frameBufferAddress,