summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/VulkanManager.cpp
diff options
context:
space:
mode:
authorBill Peckham <bpeckham@google.com>2018-09-24 14:49:10 -0700
committerDiego Wilson <diegowilson@google.com>2018-10-04 11:57:56 -0700
commit2edeff882ab756e76b3a028a1568d8774ddc0257 (patch)
tree3b54f9549f9d0ae073a49a635a164a780c6bfe12 /libs/hwui/renderthread/VulkanManager.cpp
parent1730c08a2fd38f0ff8135692a855ada865130939 (diff)
parentcbdf1ce35f096fb94a153100382f750c60b27b5c (diff)
Merge QP1A.180918.001
Conflicts: telephony/java/android/telephony/ims/ImsReasonInfo.java Change-Id: I935fa14ebd4c23231c93729e55baf39265c05199
Diffstat (limited to 'libs/hwui/renderthread/VulkanManager.cpp')
-rw-r--r--libs/hwui/renderthread/VulkanManager.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index 1517f579a084..038e13c513fd 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -40,7 +40,7 @@ namespace renderthread {
VulkanManager::VulkanManager(RenderThread& thread) : mRenderThread(thread) {}
void VulkanManager::destroy() {
- mRenderThread.renderState().onVkContextDestroyed();
+ mRenderThread.renderState().onContextDestroyed();
mRenderThread.setGrContext(nullptr);
if (VK_NULL_HANDLE != mCommandPool) {
@@ -391,7 +391,8 @@ void VulkanManager::initialize() {
GrContextOptions options;
options.fDisableDistanceFieldPaths = true;
- mRenderThread.cacheManager().configureContext(&options);
+ // TODO: get a string describing the SPIR-V compiler version and use it here
+ mRenderThread.cacheManager().configureContext(&options, nullptr, 0);
sk_sp<GrContext> grContext(GrContext::MakeVulkan(backendContext, options));
LOG_ALWAYS_FATAL_IF(!grContext.get());
mRenderThread.setGrContext(grContext);
@@ -404,7 +405,7 @@ void VulkanManager::initialize() {
mSwapBehavior = SwapBehavior::BufferAge;
}
- mRenderThread.renderState().onVkContextCreated();
+ mRenderThread.renderState().onContextCreated();
}
// Returns the next BackbufferInfo to use for the next draw. The function will make sure all
@@ -981,6 +982,22 @@ int VulkanManager::getAge(VulkanSurface* surface) {
return surface->mCurrentTime - lastUsed;
}
+status_t VulkanManager::fenceWait(sp<Fence>& fence) {
+ //TODO: Insert a wait on fence command into the Vulkan command buffer.
+ // 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;
+}
+
+status_t VulkanManager::createReleaseFence(sp<Fence>& nativeFence) {
+ //TODO: Create a fence that is signaled, when all the pending Vulkan commands are flushed.
+ return OK;
+}
+
} /* namespace renderthread */
} /* namespace uirenderer */
} /* namespace android */