Skip to content

Commit

Permalink
Add Loader 1.3 Mac compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jathoma98 committed Nov 19, 2024
1 parent 91c935f commit 5cff69e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,19 @@ RDResult WrappedVulkan::Initialise(VkInitParams &params, uint64_t sectionVersion
instNext = &flagsEXT;
}

VkInstanceCreateFlags instCreateFlags = 0;
#ifdef VK_USE_PLATFORM_MACOS_MVK
if(supportedExtensions.find(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME) !=
supportedExtensions.end())
{
if(!params.Extensions.contains(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME))
{
params.Extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
}
instCreateFlags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
}
#endif

const char **layerscstr = new const char *[params.Layers.size()];
for(size_t i = 0; i < params.Layers.size(); i++)
layerscstr[i] = params.Layers[i].c_str();
Expand All @@ -421,7 +434,7 @@ RDResult WrappedVulkan::Initialise(VkInitParams &params, uint64_t sectionVersion
VkInstanceCreateInfo instinfo = {
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
instNext,
0,
instCreateFlags,
&renderdocAppInfo,
(uint32_t)params.Layers.size(),
layerscstr,
Expand Down

0 comments on commit 5cff69e

Please sign in to comment.