diff options
author | Greg Daniel <egdaniel@google.com> | 2019-04-23 10:11:04 -0400 |
---|---|---|
committer | Greg Daniel <egdaniel@google.com> | 2019-04-23 14:36:37 -0400 |
commit | d92a9b158e8a473cd7860f2ea6cc9090fc294f78 (patch) | |
tree | 29aae9b636f2777794ec3356cbc7d3b62ee48e6f /libs/hwui/renderthread/VulkanManager.h | |
parent | 9aa53da1be3fae3f65849e0b4ad132e49c18f279 (diff) |
Fix deletion of VkSemaphores in VulkanManager.
We were deleting the VkSemaphore objects too quickly when
importing/exporting the semaphores. Even though the semaphore payload
gets reset on these operations the VkSemaphore still needs to be
finished its use in Vulkan before being deleted.
Test: manual build and testing of vulkan apps and vulakn ImageConsumer
Bug: b/130643604
Change-Id: I7f03087e477d812c0174ede3a10f12dc1df72ee1
Diffstat (limited to 'libs/hwui/renderthread/VulkanManager.h')
-rw-r--r-- | libs/hwui/renderthread/VulkanManager.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h index 1a3a0e485523..31de8030c4c1 100644 --- a/libs/hwui/renderthread/VulkanManager.h +++ b/libs/hwui/renderthread/VulkanManager.h @@ -70,10 +70,11 @@ public: void destroy(); // Inserts a wait on fence command into the Vulkan command buffer. - status_t fenceWait(sp<Fence>& fence); + status_t fenceWait(sp<Fence>& fence, GrContext* grContext); - // Creates a fence that is signaled, when all the pending Vulkan commands are flushed. - status_t createReleaseFence(sp<Fence>& nativeFence); + // Creates a fence that is signaled when all the pending Vulkan commands are finished on the + // GPU. + status_t createReleaseFence(sp<Fence>& nativeFence, GrContext* grContext); // Returned pointers are owned by VulkanManager. // An instance of VkFunctorInitParams returned from getVkFunctorInitParams refers to @@ -89,7 +90,6 @@ private: // Sets up the VkInstance and VkDevice objects. Also fills out the passed in // VkPhysicalDeviceFeatures struct. void setupDevice(GrVkExtensions&, VkPhysicalDeviceFeatures2&); - bool setupDummyCommandBuffer(); // simple wrapper class that exists only to initialize a pointer to NULL template <typename FNPTR_TYPE> @@ -164,8 +164,6 @@ private: VkQueue mPresentQueue = VK_NULL_HANDLE; VkCommandPool mCommandPool = VK_NULL_HANDLE; - VkCommandBuffer mDummyCB = VK_NULL_HANDLE; - // Variables saved to populate VkFunctorInitParams. static const uint32_t mAPIVersion = VK_MAKE_VERSION(1, 1, 0); std::vector<VkExtensionProperties> mInstanceExtensionsOwner; |