diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-10-02 18:50:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-02 21:50:03 +0000 |
commit | 81f848e54f4c66af82297b4c9d26cacf79ec10be (patch) | |
tree | a27463ff1dbb2f2208e1c4b1182ba5cc4aacc695 /Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs | |
parent | 358a7816393fab8c2c323f718c18d3610e91e681 (diff) |
Allow Surface Flinger frame enqueue after process has exited (#3733)1.1.288
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs index b24a94db..c7cddf10 100644 --- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -453,7 +453,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger Item = item }; - _device.Gpu.Window.EnqueueFrameThreadSafe( + if (_device.Gpu.Window.EnqueueFrameThreadSafe( layer.Owner, frameBufferAddress, frameBufferWidth, @@ -466,20 +466,25 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger crop, AcquireBuffer, ReleaseBuffer, - textureCallbackInformation); - - if (item.Fence.FenceCount == 0) - { - _device.Gpu.Window.SignalFrameReady(); - _device.Gpu.GPFifo.Interrupt(); - } - else + textureCallbackInformation)) { - item.Fence.RegisterCallback(_device.Gpu, (x) => + if (item.Fence.FenceCount == 0) { _device.Gpu.Window.SignalFrameReady(); _device.Gpu.GPFifo.Interrupt(); - }); + } + else + { + item.Fence.RegisterCallback(_device.Gpu, (x) => + { + _device.Gpu.Window.SignalFrameReady(); + _device.Gpu.GPFifo.Interrupt(); + }); + } + } + else + { + ReleaseBuffer(textureCallbackInformation); } } |