Attention is currently required from: Austin Eng, Quang Minh Phan.
1 comment:
File gpu/command_buffer/service/external_semaphore_pool.cc:
Patch Set #14, Line 18: IS_ANDROID
Why it is removed?
To view, visit change 4689122. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Eng, Peng Huang.
1 comment:
File gpu/command_buffer/service/external_semaphore_pool.cc:
Patch Set #14, Line 18: IS_ANDROID
Why it is removed?
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT is now used on both Android and Linux so this no longer applies for IS_ANDROID.
To view, visit change 4689122. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Eng, Quang Minh Phan, Vasiliy Telezhnikov.
Peng Huang would like Vasiliy Telezhnikov to review this change authored by Quang Minh Phan.
Always create opaque Vulkan external semaphores in ExternalSemaphore
Instead of relying on the platform VulkanImplementation to be using
opaque semaphores as the primary external semaphore handle type, we now
create opaque external semaphores directly to ensure that
ExternalVkImageBacking always work even if the VulkanImplementation is
using e.g. sync files as the primary external semaphore handle type.
Bug: 1411745
Change-Id: Ia4bd9dbc2abaf89765db11bce89b6f618d1042e9
---
M gpu/command_buffer/service/external_semaphore.cc
M gpu/command_buffer/service/external_semaphore_pool.cc
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/gpu/command_buffer/service/external_semaphore.cc b/gpu/command_buffer/service/external_semaphore.cc
index 9c814e7..77154fa 100644
--- a/gpu/command_buffer/service/external_semaphore.cc
+++ b/gpu/command_buffer/service/external_semaphore.cc
@@ -81,14 +81,13 @@
// static
ExternalSemaphore ExternalSemaphore::Create(
viz::VulkanContextProvider* context_provider) {
- auto* implementation = context_provider->GetVulkanImplementation();
VkDevice device = context_provider->GetDeviceQueue()->GetVulkanDevice();
- VkSemaphore semaphore = implementation->CreateExternalSemaphore(device);
+ VkSemaphore semaphore = CreateVkOpaqueExternalSemaphore(device);
if (semaphore == VK_NULL_HANDLE)
return {};
- auto handle = implementation->GetSemaphoreHandle(device, semaphore);
+ auto handle = ExportVkOpaqueExternalSemaphore(device, semaphore);
if (!handle.is_valid()) {
vkDestroySemaphore(device, semaphore, /*pAllocator=*/nullptr);
return {};
diff --git a/gpu/command_buffer/service/external_semaphore_pool.cc b/gpu/command_buffer/service/external_semaphore_pool.cc
index b724c59..91bdba6d 100644
--- a/gpu/command_buffer/service/external_semaphore_pool.cc
+++ b/gpu/command_buffer/service/external_semaphore_pool.cc
@@ -15,11 +15,7 @@
namespace gpu {
namespace {
-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
-// On Android, semaphores are created with handle type
-// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT. With this handle type,
-// the semaphore will not be reset to un-signalled state after waiting,
-// so semaphores cannot be reused on Android.
+#if BUILDFLAG(IS_FUCHSIA)
// On Fuchsia semaphores are passed to scenic as zx::event. Scenic doesn't reset
// them after waiting, so they would have to be reset explicitly to be reused.
// OTOH new semaphores are cheap, so reuse doesn't provide significant benefits.
To view, visit change 4689122. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Eng, Quang Minh Phan, Vasiliy Telezhnikov.
To view, visit change 4689122. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Eng, Peng Huang, Quang Minh Phan.
Patch set 14:Code-Review +1
1 comment:
File gpu/command_buffer/service/external_semaphore_pool.cc:
Patch Set #14, Line 18: IS_ANDROID
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT is now used on both Android and Linux so this no lon […]
GL_EXT_semaphore support on android is practically non-existent, so most of the time we're in a separate texture mode anyway.
ExternalVkImage backing is only used on devices with vulkan, but not DrDc for the software videos. We probably should force those devices to yuv=>rgb conversion on cpu too, but it's out of the scope here.
I believe before this change external memory path was actually broken if it would be supported, as GL_EXT_semaphore requires it to be OPAQUE_FD.
To view, visit change 4689122. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Eng, Peng Huang, Quang Minh Phan.
Patch set 14:Commit-Queue +2
Chromium LUCI CQ submitted this change.
Always create opaque Vulkan external semaphores in ExternalSemaphore
Instead of relying on the platform VulkanImplementation to be using
opaque semaphores as the primary external semaphore handle type, we now
create opaque external semaphores directly to ensure that
ExternalVkImageBacking always work even if the VulkanImplementation is
using e.g. sync files as the primary external semaphore handle type.
Bug: 1411745
Change-Id: Ia4bd9dbc2abaf89765db11bce89b6f618d1042e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4689122
Commit-Queue: Quang Minh Phan <phanquan...@gmail.com>
Reviewed-by: Vasiliy Telezhnikov <vas...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1179417}
To view, visit change 4689122. To unsubscribe, or for help writing mail filters, visit settings.