Don't overwrite vkGetInstanceProcAddress

The vk::DispatchLoaderDynamic::init(vk::VkInstance) method should note
use vkGetInstanceProcAddr to overwrite vkGetInstanceProcAddr itself.

vkGetInstanceProcAddr( a_valid_instance, "vkGetInstanceProcAddr" ) is
required to return NULL.

Fixes: 1108
This commit is contained in:
David Neto 2021-10-22 04:03:31 -04:00
parent 7f22cbae7f
commit 935e5e68fa

View File

@ -6066,6 +6066,11 @@ std::string VulkanHppGenerator::generateDispatchLoaderDynamicCommandAssignment(
CommandData const & commandData,
std::string const & firstArg ) const
{
if (commandName == "vkGetInstanceProcAddr")
{
// Don't overwite vkGetInstanceProcAddr with NULL.
return "";
}
std::string str = " " + commandName + " = PFN_" + commandName + "( vkGet" +
( ( firstArg == "device" ) ? "Device" : "Instance" ) + "ProcAddr( " + firstArg + ", \"" +
commandName + "\" ) );\n";