aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYahan Zhou <yahan@google.com>2023-10-10 15:45:10 -0700
committerYahan Zhou <yahan@google.com>2023-10-10 15:52:07 -0700
commit9db4319ce4f5b83334a29988a6b9200a8b353316 (patch)
treea98a018e1ce29a80872a03ecbe2f1bae636c1490
parentbc31dd1251e489a518922de67a1c2f24d7928b7f (diff)
downloadgoldfish-opengl-9db4319ce4f5b83334a29988a6b9200a8b353316.tar.gz
Disable compatible handle types for semaphore timeline
Bug: 304373623 Test: dEQP-VK.api.external.semaphore.sync_fd#info_timeline Change-Id: I6b55aa691e7f92b02da132732568966cc0a85c9c Merged-In: If0c1896c6acef97db9ec3ae3abfe88eea333b42f
-rw-r--r--system/vulkan_enc/ResourceTracker.cpp11
-rw-r--r--system/vulkan_enc/vk_struct_id.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/system/vulkan_enc/ResourceTracker.cpp b/system/vulkan_enc/ResourceTracker.cpp
index 906da0f1..014ecaaa 100644
--- a/system/vulkan_enc/ResourceTracker.cpp
+++ b/system/vulkan_enc/ResourceTracker.cpp
@@ -6876,7 +6876,16 @@ public:
VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT;
}
#else
- if (pExternalSemaphoreInfo->handleType ==
+ const VkSemaphoreTypeCreateInfo* semaphoreTypeCi =
+ vk_find_struct<VkSemaphoreTypeCreateInfo>(pExternalSemaphoreInfo);
+ bool isSemaphoreTimeline = semaphoreTypeCi != nullptr && semaphoreTypeCi->semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE;
+ if (isSemaphoreTimeline) {
+ // b/304373623
+ // dEQP-VK.api.external.semaphore.sync_fd#info_timeline
+ pExternalSemaphoreProperties->compatibleHandleTypes = 0;
+ pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0;
+ pExternalSemaphoreProperties->externalSemaphoreFeatures = 0;
+ } else if (pExternalSemaphoreInfo->handleType ==
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT) {
pExternalSemaphoreProperties->compatibleHandleTypes |=
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT;
diff --git a/system/vulkan_enc/vk_struct_id.h b/system/vulkan_enc/vk_struct_id.h
index 7fc535c1..355b07fb 100644
--- a/system/vulkan_enc/vk_struct_id.h
+++ b/system/vulkan_enc/vk_struct_id.h
@@ -81,6 +81,7 @@ REGISTER_VK_STRUCT_ID(VkBufferOpaqueCaptureAddressCreateInfo, VK_STRUCTURE_TYPE_
REGISTER_VK_STRUCT_ID(VkBufferDeviceAddressCreateInfoEXT, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT);
REGISTER_VK_STRUCT_ID(VkGraphicsPipelineCreateInfo, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);
REGISTER_VK_STRUCT_ID(VkPipelineRenderingCreateInfo, VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO);
+REGISTER_VK_STRUCT_ID(VkPhysicalDeviceExternalSemaphoreInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO);
#undef REGISTER_VK_STRUCT_ID