Use VULKAN_HPP_ASSERT instead of assert (#332)

* Use VULKAN_HPP_ASSERT instead of assert

Update `DispatchLoaderDynamic::init(...)` to use the `VULKAN_HPP_ASSERT` macro instead of a plain `assert`.

* Update vulkan.hpp
This commit is contained in:
Matthew Pohlmann 2019-06-11 23:17:41 -07:00 committed by Andreas Süßenbach
parent a6ad0f1eff
commit c5c5fea2dd
2 changed files with 4 additions and 4 deletions

View File

@ -2380,8 +2380,8 @@ void VulkanHppGenerator::writeDispatchLoaderDynamic(std::ostream &os)
// This interface does not require a linked vulkan library. // This interface does not require a linked vulkan library.
void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr ) void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
{ {
assert(instance && getInstanceProcAddr); VULKAN_HPP_ASSERT(instance && getInstanceProcAddr);
assert(!!device == !!getDeviceProcAddr); VULKAN_HPP_ASSERT(!!device == !!getDeviceProcAddr);
vkGetInstanceProcAddr = getInstanceProcAddr; vkGetInstanceProcAddr = getInstanceProcAddr;
vkGetDeviceProcAddr = getDeviceProcAddr ? getDeviceProcAddr : PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr") ); vkGetDeviceProcAddr = getDeviceProcAddr ? getDeviceProcAddr : PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr") );
)"; )";

View File

@ -56934,8 +56934,8 @@ namespace VULKAN_HPP_NAMESPACE
// This interface does not require a linked vulkan library. // This interface does not require a linked vulkan library.
void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr ) void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
{ {
assert(instance && getInstanceProcAddr); VULKAN_HPP_ASSERT(instance && getInstanceProcAddr);
assert(!!device == !!getDeviceProcAddr); VULKAN_HPP_ASSERT(!!device == !!getDeviceProcAddr);
vkGetInstanceProcAddr = getInstanceProcAddr; vkGetInstanceProcAddr = getInstanceProcAddr;
vkGetDeviceProcAddr = getDeviceProcAddr ? getDeviceProcAddr : PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr") ); vkGetDeviceProcAddr = getDeviceProcAddr ? getDeviceProcAddr : PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr") );
vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( instance, "vkCreateInstance" ) ); vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( instance, "vkCreateInstance" ) );