Skip to content

DispatchLoader: Allow passing explicit vkGetDeviceProcAddr to dynamic dispatch loader#2579

Draft
M2-TE wants to merge 3 commits into
KhronosGroup:mainfrom
M2-TE:fix-procaddr-loader
Draft

DispatchLoader: Allow passing explicit vkGetDeviceProcAddr to dynamic dispatch loader#2579
M2-TE wants to merge 3 commits into
KhronosGroup:mainfrom
M2-TE:fix-procaddr-loader

Conversation

@M2-TE
Copy link
Copy Markdown
Contributor

@M2-TE M2-TE commented May 19, 2026

This will resolve #2578.

This function signature overload for DispatchLoaderDynamic::init previously did not do anything with the vkGetDeviceProcAddr param:

// This interface does not require a linked vulkan library.
void init( VkInstance                instance,
           PFN_vkGetInstanceProcAddr getInstanceProcAddr,
           VkDevice                  device              = {},
           PFN_vkGetDeviceProcAddr /*getDeviceProcAddr*/ = nullptr ) VULKAN_HPP_NOEXCEPT
{
  VULKAN_HPP_ASSERT( instance && getInstanceProcAddr );
  vkGetInstanceProcAddr = getInstanceProcAddr;
  init( Instance( instance ) );
  if ( device )
  {
    init( Device( device ) );
  }
}

This PR does 4 things:

  1. Changed aforementioned function to now use the vkGetDeviceProcAddr parameter
  2. Removed default parameter assignments from aforementioned function
  3. Added function overload that only takes instance and vkInstanceProcAddr
  4. Removed surplus load of vkGetDeviceProcAddr in void init( Device deviceCpp )

I'm marking this as draft for now, as CI does not run these tests and thus, this change could be dangerous without proper testing. Please give it a try and see if it works for you @PancakeTAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to pass vkGetDeviceProcAddr to DispatchLoaderDynamic

1 participant