Fix DynamicLoader on 32-bit platforms (#427)

This commit is contained in:
Markus Tavenrath 2019-11-06 13:52:41 +01:00 committed by Andreas Süßenbach
parent fe0c9e1c14
commit 96b0bfdf0d
2 changed files with 8 additions and 4 deletions

View File

@ -1220,14 +1220,16 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic(std::string & str)
} }
} }
void init( vk::Instance instance ) VULKAN_HPP_NOEXCEPT void init( vk::Instance instanceCpp ) VULKAN_HPP_NOEXCEPT
{ {
VkInstance instance = static_cast<VkInstance>(instanceCpp);
)"; )";
str += strInstanceFunctions; str += strInstanceFunctions;
str += strDeviceFunctionsInstance; str += strDeviceFunctionsInstance;
str += " }\n\n"; str += " }\n\n";
str += " void init( vk::Device device ) VULKAN_HPP_NOEXCEPT\n {\n"; str += " void init( vk::Device deviceCpp ) VULKAN_HPP_NOEXCEPT\n {\n";
str += " VkDevice device = static_cast<VkDevice>(deviceCpp);\n";
str += strDeviceFunctions; str += strDeviceFunctions;
str += R"( } str += R"( }
}; };

View File

@ -74346,8 +74346,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
} }
void init( vk::Instance instance ) VULKAN_HPP_NOEXCEPT void init( vk::Instance instanceCpp ) VULKAN_HPP_NOEXCEPT
{ {
VkInstance instance = static_cast<VkInstance>(instanceCpp);
#ifdef VK_USE_PLATFORM_ANDROID_KHR #ifdef VK_USE_PLATFORM_ANDROID_KHR
vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) ); vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) );
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/
@ -74775,8 +74776,9 @@ namespace VULKAN_HPP_NAMESPACE
vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) ); vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) );
} }
void init( vk::Device device ) VULKAN_HPP_NOEXCEPT void init( vk::Device deviceCpp ) VULKAN_HPP_NOEXCEPT
{ {
VkDevice device = static_cast<VkDevice>(deviceCpp);
vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) ); vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) );
vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) ); vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) );
vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) ); vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) );