Skip to content

Commit

Permalink
Add preprocessor checks for Apple devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
dokterbob authored and philiptaron committed Feb 19, 2024
1 parent 42f664a commit d8c0545
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ggml-vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1109,10 +1109,15 @@ static void ggml_vk_instance_init() {
#ifdef GGML_VULKAN_VALIDATE
"VK_EXT_validation_features",
#endif
#ifdef __APPLE__
"VK_KHR_portability_enumeration",
#endif
};
vk::InstanceCreateInfo instance_create_info(vk::InstanceCreateFlags(), &app_info, layers, extensions);
#ifdef __APPLE__
instance_create_info.flags = vk::InstanceCreateFlagBits::eEnumeratePortabilityKHR;
#endif

vk::InstanceCreateInfo instance_create_info(vk::InstanceCreateFlags(vk::InstanceCreateFlagBits::eEnumeratePortabilityKHR), &app_info, layers, extensions);
#ifdef GGML_VULKAN_VALIDATE
const std::vector<vk::ValidationFeatureEnableEXT> features_enable = { vk::ValidationFeatureEnableEXT::eBestPractices };
vk::ValidationFeaturesEXT validation_features = {
Expand Down

0 comments on commit d8c0545

Please sign in to comment.