Fix missing feature from vkCreateDevice case-list
Timeline semaphores were added to all the VkPhysicalDevice.cpp case-
lists that needed it, but when users signaled they wanted the feature in
vkCreateDevice, they could get an assert from a missing feature.
Bug: b/147738281
Change-Id: I1871843d0b901347e9636e41e01c96e5e191fc8c
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53408
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Sean Risser <srisser@google.com>
Commit-Queue: Sean Risser <srisser@google.com>
diff --git a/src/Vulkan/libVulkan.cpp b/src/Vulkan/libVulkan.cpp
index a32c3ff..6fa939d 100644
--- a/src/Vulkan/libVulkan.cpp
+++ b/src/Vulkan/libVulkan.cpp
@@ -868,6 +868,14 @@
(void)hostQueryResetFeatures->hostQueryReset;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES:
+ {
+ const auto *tsFeatures = reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreFeatures *>(extensionCreateInfo);
+
+ // VK_KHR_timeline_semaphores is always enabled
+ (void)tsFeatures->timelineSemaphore;
+ break;
+ }
default:
// "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]"
LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());