Skip to content

Commit

Permalink
igl | vulkan | Only add Vulkan 1.2 feature structure if version_ >=…
Browse files Browse the repository at this point in the history
… 1.2

Summary: Don't add a Vulkan 1.2 feature structure to the `pNext` chain if the object's version is < 1.2

Reviewed By: corporateshark, rameshviswanathan

Differential Revision: D62137730

fbshipit-source-id: cdea3cf754044fb4fee53720ee6a163d6ca7ecf9
  • Loading branch information
mmaurer authored and facebook-github-bot committed Sep 3, 2024
1 parent ee4995a commit 4bdf271
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/igl/vulkan/VulkanFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ void VulkanFeatures::assembleFeatureChain(const VulkanContextConfig& config) noe
ivkAddNext(&VkPhysicalDeviceFeatures2_, &VkPhysicalDeviceShaderDrawParametersFeatures_);
ivkAddNext(&VkPhysicalDeviceFeatures2_, &VkPhysicalDeviceMultiviewFeatures_);
#if defined(VK_VERSION_1_2)
ivkAddNext(&VkPhysicalDeviceFeatures2_, &VkPhysicalDeviceShaderFloat16Int8Features_);
if (version_ >= VK_API_VERSION_1_2) {
ivkAddNext(&VkPhysicalDeviceFeatures2_, &VkPhysicalDeviceShaderFloat16Int8Features_);
}
#endif // VK_VERSION_1_2
#if defined(VK_KHR_buffer_device_address) && VK_KHR_buffer_device_address
VkPhysicalDeviceBufferDeviceAddressFeaturesKHR_.pNext = nullptr;
Expand Down

0 comments on commit 4bdf271

Please sign in to comment.