Archived
1
0
Fork 0
forked from Mirror/Ryujinx

Decrement nvmap reference count on surface flinger prealloc (#5753)

This commit is contained in:
gdkchan 2023-10-02 19:13:29 -03:00 committed by GitHub
parent 651e24fed9
commit 8b2625b0be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -669,6 +669,12 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
lock (Core.Lock) lock (Core.Lock)
{ {
// If we are replacing a buffer that has already been queued, make sure we release the references.
if (Core.Slots[slot].BufferState == BufferState.Queued)
{
Core.Slots[slot].GraphicBuffer.Object.DecrementNvMapHandleRefCount(Core.Owner);
}
Core.Slots[slot].BufferState = BufferState.Free; Core.Slots[slot].BufferState = BufferState.Free;
Core.Slots[slot].Fence = AndroidFence.NoFence; Core.Slots[slot].Fence = AndroidFence.NoFence;
Core.Slots[slot].RequestBufferCalled = false; Core.Slots[slot].RequestBufferCalled = false;