Skip to content

Commit

Permalink
vulkan: fix compatibility with MoltenVK 1.3.216
Browse files Browse the repository at this point in the history
Fixes #128
  • Loading branch information
CarterLi committed Jun 19, 2022
1 parent 61f2de1 commit d1719ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vulkan/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,17 @@ debug_layers_done: ;
}
}

#ifdef VK_KHR_portability_enumeration
// Required for macOS ( MoltenVK ) compatibility
for (int n = 0; n < num_exts_avail; n++) {
if (strcmp(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, exts_avail[n].extensionName) == 0) {
PL_ARRAY_APPEND(tmp, exts, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
break;
}
}
#endif

// Add extra user extensions
for (int i = 0; i < params->num_extensions; i++) {
const char *ext = params->extensions[i];
Expand Down

0 comments on commit d1719ff

Please sign in to comment.