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

Commit c6d5e2db authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove SyncFeatures usage from VulkanManager"

parents 8c12dcd1 7a08127e
Loading
Loading
Loading
Loading
+47 −68
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

#include "VulkanManager.h"

#include <private/gui/SyncFeatures.h>

#include "Properties.h"
#include "RenderThread.h"
#include "renderstate/RenderState.h"
@@ -1033,8 +1031,6 @@ status_t VulkanManager::fenceWait(sp<Fence>& fence) {
        return INVALID_OPERATION;
    }

    if (SyncFeatures::getInstance().useWaitSync() &&
        SyncFeatures::getInstance().useNativeFenceSync()) {
    // Block GPU on the fence.
    int fenceFd = fence->dup();
    if (fenceFd == -1) {
@@ -1088,14 +1084,6 @@ status_t VulkanManager::fenceWait(sp<Fence>& fence) {
    // state before importing. This means it will now be in an idle state with no pending
    // signal or wait operations, so it is safe to immediately delete it.
    mDestroySemaphore(mDevice, semaphore, nullptr);
    } else {
        // Block CPU on the fence.
        status_t err = fence->waitForever("VulkanManager::fenceWait");
        if (err != NO_ERROR) {
            ALOGE("VulkanManager::fenceWait: error waiting for fence: %d", err);
            return err;
        }
    }
    return OK;
}

@@ -1105,15 +1093,6 @@ status_t VulkanManager::createReleaseFence(sp<Fence>& nativeFence) {
        return INVALID_OPERATION;
    }

    if (SyncFeatures::getInstance().useFenceSync()) {
        ALOGE("VulkanManager::createReleaseFence: Vk backend doesn't support non-native fences");
        return INVALID_OPERATION;
    }

    if (!SyncFeatures::getInstance().useNativeFenceSync()) {
        return OK;
    }

    VkExportSemaphoreCreateInfo exportInfo;
    exportInfo.sType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO;
    exportInfo.pNext = nullptr;