[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:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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_;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user