Merge pull request #1109 from dneto0/dont-crash-gipa

Don't overwrite vkGetInstanceProcAddress
This commit is contained in:
Andreas Süßenbach 2021-10-25 10:47:48 +02:00 committed by GitHub
commit 7361d443a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5969,6 +5969,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";