[content handler] pipeline surface submission to mozart (flutter/engine#3915)

This change basically moves the singaling of the surface acquire event into the gpu driver, eliminating the VkQueueWaitIdle on surface submission

This change depends on https://skia-review.googlesource.com/c/25641/ so do not submit until Flutter has rolled Skia past that point
This commit is contained in:
freiling
2017-09-05 12:39:18 -07:00
committed by GitHub
parent ac69b33a9f
commit 6c58def18b
4 changed files with 11 additions and 4 deletions

View File

@@ -58,10 +58,12 @@ VulkanDevice::VulkanDevice(VulkanProcTable& p_vk,
.pQueuePriorities = priorities,
};
const char* extensions[] = {
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
const char *extensions[] = {
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
#if OS_FUCHSIA
VK_GOOGLE_EXTERNAL_MEMORY_MAGMA_EXTENSION_NAME,
VK_GOOGLE_EXTERNAL_MEMORY_MAGMA_EXTENSION_NAME,
VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME,
#endif
};

View File

@@ -55,7 +55,9 @@ class VulkanHandle {
/// the lifetime of the handle extends past the lifetime of this object.
void ReleaseOwnership() { disposer_ = nullptr; }
private:
void Reset() { DisposeIfNecessary(); }
private:
Handle handle_;
Disposer disposer_;

View File

@@ -94,6 +94,7 @@ bool VulkanProcTable::SetupInstanceProcAddresses(
ACQUIRE_PROC(CreateMagmaSurfaceKHR, handle);
ACQUIRE_PROC(ExportDeviceMemoryMAGMA, handle);
ACQUIRE_PROC(GetPhysicalDeviceMagmaPresentationSupportKHR, handle);
ACQUIRE_PROC(ImportSemaphoreFdKHR, handle);
return true;
}();
#endif // OS_FUCHSIA
@@ -146,6 +147,7 @@ bool VulkanProcTable::SetupDeviceProcAddresses(
ACQUIRE_PROC(WaitForFences, handle);
#if OS_FUCHSIA
ACQUIRE_PROC(ExportDeviceMemoryMAGMA, handle);
ACQUIRE_PROC(ImportSemaphoreFdKHR, handle);
#endif // OS_FUCHSIA
device_ = {handle, nullptr};
return true;

View File

@@ -118,6 +118,7 @@ class VulkanProcTable : public ftl::RefCountedThreadSafe<VulkanProcTable> {
DEFINE_PROC(CreateMagmaSurfaceKHR);
DEFINE_PROC(ExportDeviceMemoryMAGMA);
DEFINE_PROC(GetPhysicalDeviceMagmaPresentationSupportKHR);
DEFINE_PROC(ImportSemaphoreFdKHR);
#endif // OS_FUCHSIA
#undef DEFINE_PROC