Skip to content

Commit

Permalink
[vulkan] Fixes the string comparison when querying extensions (#4638)
Browse files Browse the repository at this point in the history
* Update vulkan_device_creator.cpp

* Update vulkan_device_creator.cpp
  • Loading branch information
bobcao3 authored Mar 28, 2022
1 parent 2203b82 commit 5b4b41b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions taichi/backends/vulkan/vulkan_device_creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,9 @@ void VulkanDeviceCreator::create_logical_device() {
VkPhysicalDeviceFeatures2KHR features2{};
features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;

#define CHECK_EXTENSION(ext) \
std::find(enabled_extensions.begin(), enabled_extensions.end(), ext) != \
#define CHECK_EXTENSION(ext) \
std::find_if(enabled_extensions.begin(), enabled_extensions.end(), \
[=](const char *o) { return strcmp(ext, o) == 0; }) != \
enabled_extensions.end()

#define CHECK_VERSION(major, minor) \
Expand Down

0 comments on commit 5b4b41b

Please sign in to comment.