Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8dc397b authored by Greg Daniel's avatar Greg Daniel
Browse files

In VuklanManager make sure we have a valid semaphore context before destroying it.

If errors occured during finishFrame that caused us to not have a
semaphore or possibly destroy the semaphore early we will end up
with a null mDestroySemaphoreContext in swapBuffers which we tried
to destroy unconditionally.

I haven't repro'd the connected bug, but based on the crash stack
this seems like the likely cause.

Test: manual code inspection and build.
Bug: 191950033
Change-Id: I0fbd33edff3552b91b980da9e3b2c45bc52a2dd0
parent 69a09397
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -579,7 +579,9 @@ void VulkanManager::swapBuffers(VulkanSurface* surface, const SkRect& dirtyRect)
        std::lock_guard<std::mutex> lock(mGraphicsQueueMutex);
        mQueueWaitIdle(mGraphicsQueue);
    }
    if (mDestroySemaphoreContext) {
        destroy_semaphore(mDestroySemaphoreContext);
    }

    surface->presentCurrentBuffer(dirtyRect, fenceFd);
    mSwapSemaphore = VK_NULL_HANDLE;